Skip to content

Commit 5a3febb

Browse files
Fix fail_fast pipeline attribute propagation
1 parent 15916a6 commit 5a3febb

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

client/pipeline.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ type Spec struct {
8181
Steps *Steps `json:"steps,omitempty"`
8282
Stages *Stages `json:"stages,omitempty"`
8383
Mode string `json:"mode,omitempty"`
84-
FailFast bool `json:"fail_fast,omitempty"`
84+
FailFast *bool `json:"fail_fast,omitempty"`
8585
RuntimeEnvironment RuntimeEnvironment `json:"runtimeEnvironment,omitempty"`
8686
TerminationPolicy []map[string]interface{} `json:"terminationPolicy,omitempty"`
8787
Hooks *Hooks `json:"hooks,omitempty"`

codefresh/resource_pipeline.go

+4-1
Original file line numberDiff line numberDiff line change
@@ -747,7 +747,10 @@ func extractSpecAttributesFromOriginalYamlString(originalYamlString string, pipe
747747
case "mode":
748748
pipeline.Spec.Mode = item.Value.(string)
749749
case "fail_fast":
750-
pipeline.Spec.FailFast = item.Value.(bool)
750+
ff, ok := item.Value.(bool)
751+
if ok {
752+
pipeline.Spec.FailFast = &ff
753+
}
751754
default:
752755
log.Printf("Unsupported entry %s", key)
753756
}

0 commit comments

Comments
 (0)