lib, gapi: Display deploy ID to add some clarity
This should make it easier to understand exactly when a new deploy starts.
This commit is contained in:
@@ -34,6 +34,7 @@ func init() {
|
|||||||
// TODO: add staged rollout functionality to this struct
|
// TODO: add staged rollout functionality to this struct
|
||||||
// TODO: add proper authentication with gpg key signing
|
// TODO: add proper authentication with gpg key signing
|
||||||
type Deploy struct {
|
type Deploy struct {
|
||||||
|
ID uint64
|
||||||
Name string // lang, puppet, yaml, etc...
|
Name string // lang, puppet, yaml, etc...
|
||||||
//Sync bool // wait for everyone to close previous GAPI before switching
|
//Sync bool // wait for everyone to close previous GAPI before switching
|
||||||
Noop bool
|
Noop bool
|
||||||
|
|||||||
@@ -529,6 +529,9 @@ func (obj *Main) Run() error {
|
|||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
mainDeploy = deploy // save this one
|
mainDeploy = deploy // save this one
|
||||||
|
if id := mainDeploy.ID; id != 0 {
|
||||||
|
Logf("deploy: got id: %d", id)
|
||||||
|
}
|
||||||
gapiObj := mainDeploy.GAPI
|
gapiObj := mainDeploy.GAPI
|
||||||
if gapiObj == nil {
|
if gapiObj == nil {
|
||||||
Logf("deploy: received empty gapi")
|
Logf("deploy: received empty gapi")
|
||||||
@@ -891,6 +894,7 @@ func (obj *Main) Run() error {
|
|||||||
Logf("deploy: error decoding deploy: %+v", err)
|
Logf("deploy: error decoding deploy: %+v", err)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
deploy.ID = latest // store the ID
|
||||||
|
|
||||||
select {
|
select {
|
||||||
case deployChan <- deploy:
|
case deployChan <- deploy:
|
||||||
|
|||||||
Reference in New Issue
Block a user