Skip to content

Commit

Permalink
#28: add pack_id to support Saas package size
Browse files Browse the repository at this point in the history
  • Loading branch information
lrochette committed Mar 4, 2022
1 parent 780ff4b commit ffda357
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions client/pipeline.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ type Spec struct {
FailFast *bool `json:"fail_fast,omitempty"`
RuntimeEnvironment RuntimeEnvironment `json:"runtimeEnvironment,omitempty"`
TerminationPolicy []map[string]interface{} `json:"terminationPolicy,omitempty"`
PackId string `json:"packId,omitempty"`
Hooks *Hooks `json:"hooks,omitempty"`
Options map[string]bool `json:"options,omitempty"`
}
Expand Down
7 changes: 7 additions & 0 deletions codefresh/resource_pipeline.go
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,10 @@ func resourcePipeline() *schema.Resource {
},
},
},
"pack_id": {
Type: schema.TypeString,
Optional: true,
},
"runtime_environment": {
Type: schema.TypeList,
Optional: true,
Expand Down Expand Up @@ -505,10 +509,12 @@ func flattenSpec(spec cfClient.Spec) []interface{} {
m["options"] = resOptions
}

m["pack_id"] = spec.PackId
m["concurrency"] = spec.Concurrency
m["branch_concurrency"] = spec.BranchConcurrency
m["trigger_concurrency"] = spec.TriggerConcurrency


m["priority"] = spec.Priority

m["contexts"] = spec.Contexts
Expand Down Expand Up @@ -633,6 +639,7 @@ func mapResourceToPipeline(d *schema.ResourceData) *cfClient.Pipeline {
OriginalYamlString: originalYamlString,
},
Spec: cfClient.Spec{
PackId: d.Get("spec.0.pack_id").(string),
Priority: d.Get("spec.0.priority").(int),
Concurrency: d.Get("spec.0.concurrency").(int),
BranchConcurrency: d.Get("spec.0.branch_concurrency").(int),
Expand Down

0 comments on commit ffda357

Please sign in to comment.