From b74e7fcb7ba6a71585a2557c09393e745c57a6d8 Mon Sep 17 00:00:00 2001 From: Daniel Gonzalez Date: Mon, 25 Mar 2024 16:19:11 -0600 Subject: [PATCH] fix: [ASSMT-284]: Reverted pipeline name enforcing --- pipelines.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pipelines.go b/pipelines.go index 05cf81c..4ce9797 100644 --- a/pipelines.go +++ b/pipelines.go @@ -78,7 +78,7 @@ func migrateSpinnakerPipelines() error { if len(migrationReq.SpinnakerAppName) == 0 { migrationReq.SpinnakerAppName = TextInput("Please provide the Spinnaker application name : ") } - if len(migrationReq.PipelineName) == 0 { + if !migrationReq.All { migrationReq.PipelineName = TextInput("Please provide the Spinnaker pipeline name : ") } @@ -378,6 +378,12 @@ func createSpinnakerPipelines(pipelines interface{}) (reqId string, err error) { OrgIdentifier: migrationReq.OrgIdentifier, AccountIdentifier: migrationReq.Account, } + j, err := json.MarshalIndent(pipelines, "", " ") + if err != nil { + log.Error(err) + } + str := string(j) + log.Info(str) url := GetUrlWithQueryParams(migrationReq.Environment, MigratorService, "spinnaker/pipelines", queryParams) resp, err := Post(url, migrationReq.Auth, pipelines) if err != nil {