Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#28: add pack_id to support Saas package size #77

Merged
merged 4 commits into from
Mar 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
6 changes: 6 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,6 +509,7 @@ 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
Expand Down Expand Up @@ -633,6 +638,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
1 change: 1 addition & 0 deletions tools.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build tools
// +build tools

package main
Expand Down