-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: import all vars exported from package (#428)
Co-authored-by: UncleGedd <42304551+UncleGedd@users.noreply.github.com>
- Loading branch information
Showing
8 changed files
with
130 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
src/test/bundles/02-simple-vars/export-name-collision/uds-bundle.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
kind: UDSBundle | ||
metadata: | ||
name: export-name-collision | ||
description: show how to specify import vars in case of name collisions | ||
version: 0.0.1 | ||
|
||
packages: | ||
- name: output-var | ||
repository: localhost:888/output-var | ||
ref: 0.0.1 | ||
exports: | ||
- name: OUTPUT | ||
- name: PRECEDENCE | ||
|
||
- name: output-var-collision | ||
repository: localhost:888/output-var-collision | ||
ref: 0.0.1 | ||
exports: | ||
- name: OUTPUT | ||
|
||
- name: receive-var | ||
repository: localhost:888/receive-var | ||
ref: 0.0.1 | ||
imports: | ||
- package: output-var-collision | ||
name: OUTPUT |
20 changes: 20 additions & 0 deletions
20
src/test/bundles/02-simple-vars/import-all-bad-name/uds-bundle.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
kind: UDSBundle | ||
metadata: | ||
name: import-all-bad-name | ||
description: show errors for bad imports | ||
version: 0.0.1 | ||
|
||
packages: | ||
- name: output-var | ||
repository: localhost:888/output-var | ||
ref: 0.0.1 | ||
exports: | ||
- name: OUTPUT | ||
- name: PRECEDENCE | ||
|
||
- name: receive-var | ||
repository: localhost:888/receive-var | ||
ref: 0.0.1 | ||
imports: | ||
- package: output-varz | ||
name: OUTPUTZ |
17 changes: 17 additions & 0 deletions
17
src/test/bundles/02-simple-vars/import-all/uds-bundle.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
kind: UDSBundle | ||
metadata: | ||
name: import-all | ||
description: show how global exports work | ||
version: 0.0.1 | ||
|
||
packages: | ||
- name: output-var | ||
repository: localhost:888/output-var | ||
ref: 0.0.1 | ||
exports: | ||
- name: OUTPUT | ||
- name: PRECEDENCE | ||
|
||
- name: receive-var | ||
repository: localhost:888/receive-var | ||
ref: 0.0.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
src/test/packages/no-cluster/output-var-collision/zarf.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
kind: ZarfPackageConfig | ||
metadata: | ||
name: output-var-collision | ||
description: | | ||
Exports variable with same name as variable exported from output-var package | ||
version: 0.0.1 | ||
|
||
variables: | ||
- name: COUNTRY | ||
default: Wales | ||
- name: FLOWER | ||
default: Daffodils | ||
|
||
components: | ||
- name: echo | ||
required: true | ||
actions: | ||
onDeploy: | ||
after: | ||
- cmd: echo ""${ZARF_VAR_FLOWER}" are the national flower of "${ZARF_VAR_COUNTRY}"" | ||
setVariables: | ||
- name: OUTPUT |