|
@@ -403,8 +403,6 @@ func updateBuildWithAgent(updateAgent *deploy.DeployAgent, client *api.Client) e
|
|
|
|
|
|
|
|
// minor thought: this ends up happening four times when upgrade is ran, when it should really only happen once
|
|
// minor thought: this ends up happening four times when upgrade is ran, when it should really only happen once
|
|
|
// maybe some way to only do this once?
|
|
// maybe some way to only do this once?
|
|
|
- fmt.Println(app)
|
|
|
|
|
- fmt.Println(namespace)
|
|
|
|
|
|
|
|
|
|
release, err := client.GetReleaseWebhook(context.Background(), config.Project, config.Cluster, app, namespace)
|
|
release, err := client.GetReleaseWebhook(context.Background(), config.Project, config.Cluster, app, namespace)
|
|
|
|
|
|
|
@@ -431,7 +429,7 @@ func updateBuildWithAgent(updateAgent *deploy.DeployAgent, client *api.Client) e
|
|
|
ID: "build",
|
|
ID: "build",
|
|
|
Name: "Build",
|
|
Name: "Build",
|
|
|
Index: 110,
|
|
Index: 110,
|
|
|
- Status: api.EventStatusInProgress,
|
|
|
|
|
|
|
+ Status: api.EventStatusFailed,
|
|
|
Info: err.Error(),
|
|
Info: err.Error(),
|
|
|
}, release.WebhookToken)
|
|
}, release.WebhookToken)
|
|
|
}
|
|
}
|
|
@@ -447,7 +445,20 @@ func updateBuildWithAgent(updateAgent *deploy.DeployAgent, client *api.Client) e
|
|
|
ID: "build",
|
|
ID: "build",
|
|
|
Name: "Build",
|
|
Name: "Build",
|
|
|
Index: 120,
|
|
Index: 120,
|
|
|
- Status: api.EventStatusInProgress,
|
|
|
|
|
|
|
+ Status: api.EventStatusFailed,
|
|
|
|
|
+ Info: err.Error(),
|
|
|
|
|
+ }, release.WebhookToken)
|
|
|
|
|
+ }
|
|
|
|
|
+ return err
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if err := updateAgent.Build(); err != nil {
|
|
|
|
|
+ if stream {
|
|
|
|
|
+ updateAgent.StreamEvent(api.Event{
|
|
|
|
|
+ ID: "build",
|
|
|
|
|
+ Name: "Build",
|
|
|
|
|
+ Index: 130,
|
|
|
|
|
+ Status: api.EventStatusFailed,
|
|
|
Info: err.Error(),
|
|
Info: err.Error(),
|
|
|
}, release.WebhookToken)
|
|
}, release.WebhookToken)
|
|
|
}
|
|
}
|
|
@@ -458,13 +469,13 @@ func updateBuildWithAgent(updateAgent *deploy.DeployAgent, client *api.Client) e
|
|
|
updateAgent.StreamEvent(api.Event{
|
|
updateAgent.StreamEvent(api.Event{
|
|
|
ID: "build",
|
|
ID: "build",
|
|
|
Name: "Build",
|
|
Name: "Build",
|
|
|
- Index: 130,
|
|
|
|
|
|
|
+ Index: 140,
|
|
|
Status: api.EventStatusSuccess,
|
|
Status: api.EventStatusSuccess,
|
|
|
Info: "",
|
|
Info: "",
|
|
|
}, release.WebhookToken)
|
|
}, release.WebhookToken)
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- return updateAgent.Build()
|
|
|
|
|
|
|
+ return nil
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
func updatePushWithAgent(updateAgent *deploy.DeployAgent) error {
|
|
func updatePushWithAgent(updateAgent *deploy.DeployAgent) error {
|