Skip to content

Commit 946e350

Browse files
authored
Merge pull request #77 from codefresh-io/saas_pack
#28: add pack_id to support Saas package size
2 parents 780ff4b + 5db5a44 commit 946e350

File tree

3 files changed

+8
-0
lines changed

3 files changed

+8
-0
lines changed

client/pipeline.go

+1
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ type Spec struct {
9292
FailFast *bool `json:"fail_fast,omitempty"`
9393
RuntimeEnvironment RuntimeEnvironment `json:"runtimeEnvironment,omitempty"`
9494
TerminationPolicy []map[string]interface{} `json:"terminationPolicy,omitempty"`
95+
PackId string `json:"packId,omitempty"`
9596
Hooks *Hooks `json:"hooks,omitempty"`
9697
Options map[string]bool `json:"options,omitempty"`
9798
}

codefresh/resource_pipeline.go

+6
Original file line numberDiff line numberDiff line change
@@ -310,6 +310,10 @@ func resourcePipeline() *schema.Resource {
310310
},
311311
},
312312
},
313+
"pack_id": {
314+
Type: schema.TypeString,
315+
Optional: true,
316+
},
313317
"runtime_environment": {
314318
Type: schema.TypeList,
315319
Optional: true,
@@ -505,6 +509,7 @@ func flattenSpec(spec cfClient.Spec) []interface{} {
505509
m["options"] = resOptions
506510
}
507511

512+
m["pack_id"] = spec.PackId
508513
m["concurrency"] = spec.Concurrency
509514
m["branch_concurrency"] = spec.BranchConcurrency
510515
m["trigger_concurrency"] = spec.TriggerConcurrency
@@ -633,6 +638,7 @@ func mapResourceToPipeline(d *schema.ResourceData) *cfClient.Pipeline {
633638
OriginalYamlString: originalYamlString,
634639
},
635640
Spec: cfClient.Spec{
641+
PackId: d.Get("spec.0.pack_id").(string),
636642
Priority: d.Get("spec.0.priority").(int),
637643
Concurrency: d.Get("spec.0.concurrency").(int),
638644
BranchConcurrency: d.Get("spec.0.branch_concurrency").(int),

tools.go

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
//go:build tools
12
// +build tools
23

34
package main

0 commit comments

Comments
 (0)