Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: pull the current bundle and package names when deploying #103

Merged
merged 1 commit into from
Apr 6, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 20 additions & 4 deletions tasks/deploy.yaml
Original file line number Diff line number Diff line change
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