Skip to content

Commit 8cff410

Browse files
Merge pull request #2019 from bruin-data/patch/expose-variant-name
expose selected variant name
2 parents ea24c7f + 400d01b commit 8cff410

14 files changed

Lines changed: 14 additions & 0 deletions

File tree

integration-tests/test-pipelines/parse-asset-extends/expectations/pipeline.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,5 +152,6 @@
152152
"snapshot": "",
153153
"agent": false,
154154
"variables": null,
155+
"selected_variant": "",
155156
"macros": []
156157
}

integration-tests/test-pipelines/parse-default-option/expectations/pipeline.yml.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -343,5 +343,6 @@
343343
"snapshot": "",
344344
"agent": false,
345345
"variables": null,
346+
"selected_variant": "",
346347
"macros": []
347348
}

integration-tests/test-pipelines/parse-happy-path/expectations/pipeline.yml.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,5 +281,6 @@
281281
"snapshot": "",
282282
"agent": false,
283283
"variables": null,
284+
"selected_variant": "",
284285
"macros": []
285286
}

integration-tests/test-pipelines/parse-lineage-pipeline/expectations/lineage.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -585,5 +585,6 @@
585585
"snapshot": "",
586586
"agent": false,
587587
"variables": null,
588+
"selected_variant": "",
588589
"macros": []
589590
}

integration-tests/test-pipelines/parse-whole-pipeline/expectations/pipeline.yml.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,7 @@
245245
"snapshot": "",
246246
"agent": false,
247247
"variables": null,
248+
"selected_variant": "",
248249
"macros": [
249250
"{{ some_macro() }}"
250251
]

pkg/pipeline/pipeline.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1581,6 +1581,7 @@ type Pipeline struct {
15811581
Agent bool `json:"agent" yaml:"agent,omitempty" mapstructure:"agent"`
15821582
Variables Variables `json:"variables" yaml:"variables,omitempty" mapstructure:"variables"`
15831583
Variants VariantSet `json:"variants,omitempty" yaml:"variants,omitempty" mapstructure:"variants"`
1584+
SelectedVariant string `json:"selected_variant" yaml:"-"`
15841585
TasksByType map[AssetType][]*Asset `json:"-" yaml:"-"`
15851586
tasksByName map[string]*Asset `yaml:"-"`
15861587
MacrosPath string `json:"-" yaml:"-"`

pkg/pipeline/testdata/pipeline/first-pipeline_unix.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -311,5 +311,6 @@
311311
"snapshot": "",
312312
"agent": false,
313313
"variables": null,
314+
"selected_variant": "",
314315
"macros": []
315316
}

pkg/pipeline/testdata/pipeline/first-pipeline_windows.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
"path": "__BASEDIR__\\testdata\\pipeline\\first-pipeline\\pipeline.yml"
1515
},
1616
"variables": null,
17+
"selected_variant": "",
1718
"macros": [],
1819
"default_connections": {
1920
"gcpConnectionId": "gcp-connection-id-here",

pkg/pipeline/testdata/pipeline/pipeline-with-no-assets_unix.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,5 +34,6 @@
3434
"snapshot": "",
3535
"agent": false,
3636
"variables": null,
37+
"selected_variant": "",
3738
"macros": []
3839
}

pkg/pipeline/testdata/pipeline/pipeline-with-no-assets_windows.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
"path": "__BASEDIR__\\testdata\\pipeline\\pipeline-with-no-assets\\pipeline.yml"
1515
},
1616
"variables": null,
17+
"selected_variant": "",
1718
"macros": [],
1819
"default_connections": {
1920
"gcpConnectionId": "gcp-connection-id-here",

0 commit comments

Comments
 (0)