-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathdeploy.yaml
54 lines (52 loc) · 2.39 KB
/
deploy.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# Copyright 2024 Defense Unicorns
# SPDX-License-Identifier: AGPL-3.0-or-later OR LicenseRef-Defense-Unicorns-Commercial
tasks:
- name: package
description: Deploy the created UDS Zarf Package
inputs:
options:
description: For setting deploy time variables and flags
path:
description: Path relative to the repositories root where the zarf.yaml and .tar.zst lives
default: .
config:
description: Optionally provide a path to a Zarf config file
default: ""
required: false
actions:
- description: Get the current Zarf package name
cmd: cat ${{ .inputs.path }}/zarf.yaml | ./uds zarf tools yq .metadata.name
setVariables:
- name: PACKAGE_NAME
- description: Get the current Zarf package version
cmd: cat ${{ .inputs.path }}/zarf.yaml | ./uds zarf tools yq .metadata.version
setVariables:
- name: PACKAGE_VERSION
- description: Deploy the UDS Zarf Package
env:
- ZARF_CONFIG=${{ .inputs.config }}
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
description: Deploy the created test bundle (deploying package + dependencies for testing)
inputs:
path:
description: Path relative to the repositories root where the uds-bundle.yaml and .tar.zst lives
default: bundle
config:
description: Path to the bundle config file. Defaults to bundle/uds-config.yaml.
default: bundle/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 | ./uds zarf tools yq .metadata.name
setVariables:
- name: BUNDLE_NAME
- description: Get the current UDS Bundle version
cmd: cat ${{ .inputs.path }}/uds-bundle.yaml | ./uds zarf tools yq .metadata.version
setVariables:
- name: BUNDLE_VERSION
- description: Deploy the UDS bundle with the package and its dependencies
env:
- UDS_CONFIG=${{ .inputs.config }}
cmd: ./uds deploy "${{ .inputs.path }}/uds-bundle-${BUNDLE_NAME}-${UDS_ARCH}-${BUNDLE_VERSION}.tar.zst" --confirm --no-progress ${{ .inputs.options }}