|
|
@@ -141,14 +141,17 @@ func Apply(ctx context.Context, cliConf config.CLIConfig, client api.Client, por
|
|
|
buildSettings.ProjectID = cliConf.Project
|
|
|
|
|
|
err = build(ctx, client, buildSettings)
|
|
|
+ buildMetadata := make(map[string]interface{})
|
|
|
+ buildMetadata["end_time"] = time.Now().UTC()
|
|
|
+
|
|
|
if err != nil {
|
|
|
- _ = updateExistingEvent(ctx, client, appName, cliConf.Project, cliConf.Cluster, targetResp.DeploymentTargetID, eventID, types.PorterAppEventStatus_Failed, nil)
|
|
|
+ _ = updateExistingEvent(ctx, client, appName, cliConf.Project, cliConf.Cluster, targetResp.DeploymentTargetID, eventID, types.PorterAppEventStatus_Failed, buildMetadata)
|
|
|
return fmt.Errorf("error building app: %w", err)
|
|
|
}
|
|
|
|
|
|
color.New(color.FgGreen).Printf("Successfully built image (tag: %s)\n", buildSettings.ImageTag) // nolint:errcheck,gosec
|
|
|
|
|
|
- _ = updateExistingEvent(ctx, client, appName, cliConf.Project, cliConf.Cluster, targetResp.DeploymentTargetID, eventID, types.PorterAppEventStatus_Success, nil)
|
|
|
+ _ = updateExistingEvent(ctx, client, appName, cliConf.Project, cliConf.Cluster, targetResp.DeploymentTargetID, eventID, types.PorterAppEventStatus_Success, buildMetadata)
|
|
|
|
|
|
applyResp, err = client.ApplyPorterApp(ctx, cliConf.Project, cliConf.Cluster, "", "", applyResp.AppRevisionId)
|
|
|
if err != nil {
|
|
|
@@ -160,7 +163,7 @@ func Apply(ctx context.Context, cliConf config.CLIConfig, client api.Client, por
|
|
|
color.New(color.FgGreen).Printf("Waiting for predeploy to complete...\n") // nolint:errcheck,gosec
|
|
|
|
|
|
now := time.Now().UTC()
|
|
|
- eventID, _ := createPredeployEvent(ctx, client, appName, cliConf.Project, cliConf.Cluster, targetResp.DeploymentTargetID, now)
|
|
|
+ eventID, _ := createPredeployEvent(ctx, client, appName, cliConf.Project, cliConf.Cluster, targetResp.DeploymentTargetID, now, applyResp.AppRevisionId)
|
|
|
|
|
|
eventStatus := types.PorterAppEventStatus_Success
|
|
|
for {
|