close
Skip to content

Commit 4b27106

Browse files
authored
chore: pull the current bundle and package names when deploying (#103)
1 parent 5e4414d commit 4b27106

1 file changed

Lines changed: 20 additions & 4 deletions

File tree

‎tasks/deploy.yaml‎

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,38 @@ tasks:
44
options:
55
description: For setting deploy time variables and flags
66
path:
7-
description: Path of built zarf package to deploy
7+
description: Path relative to the repositories root where the zarf.yaml and .tar.zst lives
88
default: .
99
actions:
10+
- description: Get the current Zarf package name
11+
cmd: cat ${{ .inputs.path }}/zarf.yaml | yq .metadata.name
12+
setVariables:
13+
- name: PACKAGE_NAME
14+
- description: Get the current Zarf package version
15+
cmd: cat ${{ .inputs.path }}/zarf.yaml | yq .metadata.version
16+
setVariables:
17+
- name: PACKAGE_VERSION
1018
- description: Deploy the UDS Zarf Package
11-
cmd: ./uds zarf package deploy ${{ .inputs.path }}/zarf-package-*-${UDS_ARCH}-*.tar.zst --confirm --no-progress ${{ .inputs.options }}
19+
cmd: ./uds zarf package deploy ${{ .inputs.path }}/zarf-package-${PACKAGE_NAME}-${UDS_ARCH}-${PACKAGE_VERSION}.tar.zst --confirm --no-progress ${{ .inputs.options }}
1220

1321
- name: test-bundle
1422
inputs:
1523
path:
16-
description: Path relative to the repositories root where the uds-bundle.yaml lives
24+
description: Path relative to the repositories root where the uds-bundle.yaml and .tar.zst lives
1725
default: bundle
1826
config:
1927
description: File name of the bundle config file. Defaults to uds-config.yaml. Path is relative to the path input.
2028
default: uds-config.yaml
2129
options:
2230
description: For setting deploy time variables and flags
2331
actions:
32+
- description: Get the current UDS Bundle name
33+
cmd: cat ${{ .inputs.path }}/uds-bundle.yaml | yq .metadata.name
34+
setVariables:
35+
- name: BUNDLE_NAME
36+
- description: Get the current UDS Bundle version
37+
cmd: cat ${{ .inputs.path }}/uds-bundle.yaml | yq .metadata.version
38+
setVariables:
39+
- name: BUNDLE_VERSION
2440
- description: Deploy the UDS bundle with the package and its dependencies
25-
cmd: UDS_CONFIG=${{ .inputs.path }}/${{ .inputs.config }} ./uds deploy ${{ .inputs.path }}/uds-bundle-*-${UDS_ARCH}-*.tar.zst --confirm --no-progress ${{ .inputs.options }} --no-tea
41+
cmd: UDS_CONFIG=${{ .inputs.path }}/${{ .inputs.config }} ./uds deploy ${{ .inputs.path }}/uds-bundle-${BUNDLE_NAME}-${UDS_ARCH}-${BUNDLE_VERSION}.tar.zst --confirm --no-progress ${{ .inputs.options }} --no-tea

0 commit comments

Comments
 (0)