Skip to content

Commit

Permalink
Fix fail_fast pipeline attribute propagation
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-codefresh committed Apr 22, 2021
1 parent 515053e commit 70a34f7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion client/pipeline.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
Expand Down
5 changes: 4 additions & 1 deletion codefresh/resource_pipeline.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down

0 comments on commit 70a34f7

Please sign in to comment.