diff --git a/pkg/platform/api/buildplanner/model/buildplan.go b/pkg/platform/api/buildplanner/model/buildplan.go index 005adf9ed9..91c110ea5b 100644 --- a/pkg/platform/api/buildplanner/model/buildplan.go +++ b/pkg/platform/api/buildplanner/model/buildplan.go @@ -20,7 +20,7 @@ const ( // BuildPlan statuses Planning = "PLANNING" Planned = "PLANNED" - Building = "BUILDING" + Started = "STARTED" Completed = "COMPLETED" // Artifact statuses diff --git a/pkg/platform/model/buildplanner.go b/pkg/platform/model/buildplanner.go index 08738e4eb1..16a6ce71bc 100644 --- a/pkg/platform/model/buildplanner.go +++ b/pkg/platform/model/buildplanner.go @@ -17,7 +17,6 @@ import ( "github.com/ActiveState/cli/pkg/platform/api/buildplanner/model" bpModel "github.com/ActiveState/cli/pkg/platform/api/buildplanner/model" "github.com/ActiveState/cli/pkg/platform/api/buildplanner/request" - "github.com/ActiveState/cli/pkg/platform/api/headchef" "github.com/ActiveState/cli/pkg/platform/api/headchef/headchef_models" "github.com/ActiveState/cli/pkg/platform/api/reqsimport" "github.com/ActiveState/cli/pkg/platform/authentication" @@ -53,7 +52,7 @@ type BuildResult struct { CommitID strfmt.UUID Build *bpModel.Build BuildStatusResponse *headchef_models.V1BuildStatusResponse - BuildStatus headchef.BuildStatusEnum + BuildStatus string BuildReady bool } @@ -154,6 +153,7 @@ func (bp *BuildPlanner) FetchBuildResult(commitID strfmt.UUID, owner, project st BuildEngine: buildEngine, Build: build, BuildReady: build.Status == bpModel.Completed, + BuildStatus: build.Status, CommitID: id, } diff --git a/pkg/platform/runtime/setup/setup.go b/pkg/platform/runtime/setup/setup.go index 1b0e9a88ff..15b85b36f6 100644 --- a/pkg/platform/runtime/setup/setup.go +++ b/pkg/platform/runtime/setup/setup.go @@ -31,7 +31,6 @@ import ( "github.com/ActiveState/cli/internal/rtutils/ptr" "github.com/ActiveState/cli/internal/svcctl" "github.com/ActiveState/cli/internal/unarchiver" - "github.com/ActiveState/cli/pkg/platform/api/headchef" "github.com/ActiveState/cli/pkg/platform/api/inventory/inventory_models" "github.com/ActiveState/cli/pkg/platform/authentication" apimodel "github.com/ActiveState/cli/pkg/platform/model" @@ -429,14 +428,10 @@ func (s *Setup) fetchAndInstallArtifactsFromBuildPlan(installFunc artifactInstal } // send analytics build event, if a new runtime has to be built in the cloud - if buildResult.BuildStatus == headchef.Started { + if buildResult.BuildStatus == bpModel.Started { s.analytics.Event(anaConsts.CatRuntime, anaConsts.ActRuntimeBuild, dimensions) } - if buildResult.BuildStatus == headchef.Failed { - return nil, nil, &BuildError{locale.NewError("headchef_build_failure", "Build Failed: {{.V0}}", buildResult.BuildStatusResponse.Message)} - } - changedArtifacts, err := buildplan.NewBaseArtifactChangesetByBuildPlan(buildResult.Build, false) if err != nil { return nil, nil, errs.Wrap(err, "Could not compute base artifact changeset")