-
Notifications
You must be signed in to change notification settings - Fork 45
132 lines (107 loc) · 4.49 KB
/
Copy pathtest-cli-matrix.yaml
File metadata and controls
132 lines (107 loc) · 4.49 KB
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
# Copyright 2026 Defense Unicorns
# SPDX-License-Identifier: AGPL-3.0-or-later OR LicenseRef-Defense-Unicorns-Commercial
name: CLI Compatibility
on:
schedule:
# Runs every morning at 2:00 AM UTC
- cron: "0 2 * * *"
pull_request:
# milestoned is added here as a workaround for release-please not triggering PR workflows (PRs should be added to a milestone to trigger the workflow).
# labeled is added to support renovate-ready labelling on PRs
types: [milestoned, labeled, opened, reopened, synchronize]
paths:
- ".github/workflows/test-cli-matrix.yaml"
- "bundles/k3d-standard/**"
# Abort prior jobs in the same workflow / PR
concurrency:
group: test-cli-matrix-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
id-token: write # This is needed for OIDC federation.
packages: read # Allows reading the published GHCR packages
jobs:
cli-upgrade:
runs-on: uds-ubuntu-big-boy-8-core
timeout-minutes: 60
name: "Test Upgrade (${{ matrix.scenario }}, ${{ matrix.flavor }})"
strategy:
matrix:
include:
# Both versions intentionally frozen on last compatible CLI version
- scenario: old-old
flavor: upstream
install_cli: v0.29.0
upgrade_cli: v0.29.0
# install_cli intentionally frozen (last compatible version); upgrade_cli tracks new releases via Renovate
- scenario: old-new
flavor: upstream
install_cli: v0.29.0
# renovate: datasource=github-tags depName=defenseunicorns/uds-cli versioning=semver
upgrade_cli: v0.31.0
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Environment setup
uses: ./.github/actions/setup
with:
ghToken: ${{ secrets.GITHUB_TOKEN }}
installK3d: 'true'
# Override the CLI installed by setup with the install-phase version (old CLI)
- name: Install CLI for install phase
uses: defenseunicorns/setup-uds@ab842abcad1f7a3305c2538e3dd1950d0daacfa5 # v1.0.1
with:
version: ${{ matrix.install_cli }}
- name: Print CLI version for debug
run: uds version
- name: Deploy latest release (install phase)
run: uds run -f tasks/deploy.yaml latest-bundle-release --set FLAVOR=${{ matrix.flavor }} --no-progress
- name: Deploy latest release test resources
run: uds run -f tasks/deploy.yaml latest-release-test-resources --set FLAVOR=${{ matrix.flavor }} --no-progress
# Switch to the upgrade-phase CLI version before building and deploying current branch
- name: Install CLI for upgrade phase
uses: defenseunicorns/setup-uds@ab842abcad1f7a3305c2538e3dd1950d0daacfa5 # v1.0.1
with:
version: ${{ matrix.upgrade_cli }}
- name: Print CLI version for debug
run: uds version
- name: Run upgrade phase
run: uds run -f tasks/test.yaml upgrade-existing --set FLAVOR=${{ matrix.flavor }} --no-progress
- name: Debug Output
if: ${{ always() }}
uses: ./.github/actions/debug-output
- name: Save logs
if: always()
uses: ./.github/actions/save-logs
with:
suffix: -upgrade-matrix-${{ matrix.scenario }}-${{ matrix.flavor }}
cli-install:
runs-on: uds-ubuntu-big-boy-8-core
timeout-minutes: 30
name: "Test Install (old, upstream)"
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Environment setup
uses: ./.github/actions/setup
with:
ghToken: ${{ secrets.GITHUB_TOKEN }}
installK3d: 'true'
# Override the CLI installed by setup with the old CLI to verify current branch installs cleanly without new CLI
# Intentionally frozen — represents the last compatible CLI version
- name: Install old CLI
uses: defenseunicorns/setup-uds@ab842abcad1f7a3305c2538e3dd1950d0daacfa5 # v1.0.1
with:
version: v0.29.0
- name: Print CLI version for debug
run: uds version
- name: Test UDS Core Install (old CLI)
run: uds run test:uds-core-e2e --set FLAVOR=upstream --no-progress
- name: Debug Output
if: ${{ always() }}
uses: ./.github/actions/debug-output
- name: Save logs
if: always()
uses: ./.github/actions/save-logs
with:
suffix: -install-old-cli-upstream