From 5a3febbe5fa7aaffae7220aee996f3384d0e0ebf Mon Sep 17 00:00:00 2001 From: alex-codefresh Date: Thu, 22 Apr 2021 08:16:32 +0300 Subject: [PATCH] Fix fail_fast pipeline attribute propagation --- client/pipeline.go | 2 +- codefresh/resource_pipeline.go | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/client/pipeline.go b/client/pipeline.go index d6616c1..5d089cd 100644 --- a/client/pipeline.go +++ b/client/pipeline.go @@ -81,7 +81,7 @@ type Spec struct { Steps *Steps `json:"steps,omitempty"` Stages *Stages `json:"stages,omitempty"` Mode string `json:"mode,omitempty"` - FailFast bool `json:"fail_fast,omitempty"` + FailFast *bool `json:"fail_fast,omitempty"` RuntimeEnvironment RuntimeEnvironment `json:"runtimeEnvironment,omitempty"` TerminationPolicy []map[string]interface{} `json:"terminationPolicy,omitempty"` Hooks *Hooks `json:"hooks,omitempty"` diff --git a/codefresh/resource_pipeline.go b/codefresh/resource_pipeline.go index 057260c..6ec621e 100644 --- a/codefresh/resource_pipeline.go +++ b/codefresh/resource_pipeline.go @@ -747,7 +747,10 @@ func extractSpecAttributesFromOriginalYamlString(originalYamlString string, pipe case "mode": pipeline.Spec.Mode = item.Value.(string) case "fail_fast": - pipeline.Spec.FailFast = item.Value.(bool) + ff, ok := item.Value.(bool) + if ok { + pipeline.Spec.FailFast = &ff + } default: log.Printf("Unsupported entry %s", key) }