Skip to content

Commit

Permalink
type should be bool rather than string
Browse files Browse the repository at this point in the history
  • Loading branch information
Nguyen, Tung authored and Nguyen, Tung committed Oct 28, 2021
1 parent 7f62201 commit d71d2cf
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions client/pipeline.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,10 @@ type Trigger struct {
}

type TriggerOptions struct {
NoCache string `json:"noCache,omitempty"`
NoCfCache string `json:"noCfCache,omitempty"`
ResetVolume string `json:"resetVolume,omitempty"`
EnableNotifications string `json:"enableNotifications,omitempty"`
NoCache bool `json:"noCache,omitempty"`
NoCfCache bool `json:"noCfCache,omitempty"`
ResetVolume bool `json:"resetVolume,omitempty"`
EnableNotifications bool `json:"enableNotifications,omitempty"`
}

type RuntimeEnvironment struct {
Expand Down
8 changes: 4 additions & 4 deletions codefresh/resource_pipeline.go
Original file line number Diff line number Diff line change
Expand Up @@ -693,10 +693,10 @@ func mapResourceToPipeline(d *schema.ResourceData) *cfClient.Pipeline {
codefreshTrigger.SetVariables(variables)
if _, ok := d.GetOk(fmt.Sprintf("spec.0.trigger.%v.options", idx)); ok {
options := cfClient.TriggerOptions{
NoCache: d.Get(fmt.Sprintf("spec.0.trigger.%v.options.0.no_cache", idx)).(string),
NoCfCache: d.Get(fmt.Sprintf("spec.0.trigger.%v.options.0.no_cf_cache", idx)).(string),
ResetVolume: d.Get(fmt.Sprintf("spec.0.trigger.%v.options.0.reset_volume", idx)).(string),
EnableNotifications: d.Get(fmt.Sprintf("spec.0.trigger.%v.options.0.enable_notifications", idx)).(string),
NoCache: d.Get(fmt.Sprintf("spec.0.trigger.%v.options.0.no_cache", idx)).(bool),
NoCfCache: d.Get(fmt.Sprintf("spec.0.trigger.%v.options.0.no_cf_cache", idx)).(bool),
ResetVolume: d.Get(fmt.Sprintf("spec.0.trigger.%v.options.0.reset_volume", idx)).(bool),
EnableNotifications: d.Get(fmt.Sprintf("spec.0.trigger.%v.options.0.enable_notifications", idx)).(bool),
}
codefreshTrigger.Options = &options
}
Expand Down

0 comments on commit d71d2cf

Please sign in to comment.