Skip to content

Commit

Permalink
chore: pull the current bundle and package names when deploying (#103)
Browse files Browse the repository at this point in the history
  • Loading branch information
Racer159 committed Apr 6, 2024
1 parent 5e4414d commit 4b27106
Showing 1 changed file with 20 additions and 4 deletions.
24 changes: 20 additions & 4 deletions tasks/deploy.yaml
Expand Up @@ -4,22 +4,38 @@ tasks:
options:
description: For setting deploy time variables and flags
path:
description: Path of built zarf package to deploy
description: Path relative to the repositories root where the zarf.yaml and .tar.zst lives
default: .
actions:
- description: Get the current Zarf package name
cmd: cat ${{ .inputs.path }}/zarf.yaml | yq .metadata.name
setVariables:
- name: PACKAGE_NAME
- description: Get the current Zarf package version
cmd: cat ${{ .inputs.path }}/zarf.yaml | yq .metadata.version
setVariables:
- name: PACKAGE_VERSION
- description: Deploy the UDS Zarf Package
cmd: ./uds zarf package deploy ${{ .inputs.path }}/zarf-package-*-${UDS_ARCH}-*.tar.zst --confirm --no-progress ${{ .inputs.options }}
cmd: ./uds zarf package deploy ${{ .inputs.path }}/zarf-package-${PACKAGE_NAME}-${UDS_ARCH}-${PACKAGE_VERSION}.tar.zst --confirm --no-progress ${{ .inputs.options }}

- name: test-bundle
inputs:
path:
description: Path relative to the repositories root where the uds-bundle.yaml lives
description: Path relative to the repositories root where the uds-bundle.yaml and .tar.zst lives
default: bundle
config:
description: File name of the bundle config file. Defaults to uds-config.yaml. Path is relative to the path input.
default: uds-config.yaml
options:
description: For setting deploy time variables and flags
actions:
- description: Get the current UDS Bundle name
cmd: cat ${{ .inputs.path }}/uds-bundle.yaml | yq .metadata.name
setVariables:
- name: BUNDLE_NAME
- description: Get the current UDS Bundle version
cmd: cat ${{ .inputs.path }}/uds-bundle.yaml | yq .metadata.version
setVariables:
- name: BUNDLE_VERSION
- description: Deploy the UDS bundle with the package and its dependencies
cmd: UDS_CONFIG=${{ .inputs.path }}/${{ .inputs.config }} ./uds deploy ${{ .inputs.path }}/uds-bundle-*-${UDS_ARCH}-*.tar.zst --confirm --no-progress ${{ .inputs.options }} --no-tea
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 comments on commit 4b27106

Please sign in to comment.