runservice: executor: provide architecture information
This commit is contained in:
parent
d3e95ba665
commit
a511fbf10c
|
@ -27,6 +27,7 @@ import (
|
|||
"os"
|
||||
"os/exec"
|
||||
"path/filepath"
|
||||
"runtime"
|
||||
"strings"
|
||||
"sync"
|
||||
"time"
|
||||
|
@ -650,9 +651,19 @@ func (e *Executor) archivePath(taskID string, stepID int) string {
|
|||
}
|
||||
|
||||
func (e *Executor) sendExecutorStatus(ctx context.Context) error {
|
||||
labels := e.c.Labels
|
||||
if labels == nil {
|
||||
labels = make(map[string]string)
|
||||
}
|
||||
|
||||
// Add special labels (and override config provided ones)
|
||||
arch := runtime.GOARCH
|
||||
labels["arch"] = arch
|
||||
|
||||
executor := &types.Executor{
|
||||
ID: e.id,
|
||||
ListenURL: e.listenURL,
|
||||
Labels: labels,
|
||||
}
|
||||
|
||||
log.Debugf("send executor status: %s", util.Dump(executor))
|
||||
|
|
|
@ -654,6 +654,8 @@ type Executor struct {
|
|||
ID string `json:"id,omitempty"`
|
||||
ListenURL string `json:"listenURL,omitempty"`
|
||||
|
||||
Labels map[string]string `json:"labels,omitempty"`
|
||||
|
||||
// internal values not saved
|
||||
Revision int64 `json:"-"`
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue