-
Notifications
You must be signed in to change notification settings - Fork 21
80 lines (71 loc) · 2.59 KB
/
application-test-scenario-upgrade.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
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
name: Application Specific Test - Upgrade
on:
workflow_dispatch:
inputs:
apps:
description: 'The ginkgo label filter query of kommander applications to test, e.g. reloader, or reloader || cert-manager'
required: true
type: string
from_version_ref:
description: 'The NKP version(git branch or tag) version to upgrade from. e.g., v2.7.0-dev'
required: true
type: string
to_version_ref:
description: 'The NKP version(git branch or tag) to run upgrade to. Using latest version by default e.g., v2.8.0-dev'
required: true
type: string
workflow_call:
inputs:
apps:
description: 'The ginkgo label filter query of kommander applications to test, e.g. reloader, or reloader || cert-manager'
required: true
type: string
from_version_ref:
description: 'The NKP version(git branch or tag) version to upgrade from. e.g., v2.7.0-dev'
required: true
type: string
to_version_ref:
description: 'The NKP version(git branch or tag) to run upgrade to. Using latest version by default e.g., v2.8.0-dev'
required: true
type: string
env:
UPGRADE_KAPPS_REPO_PATH: '.work/upgrade/kommander-applications'
jobs:
run-test-scenario:
runs-on:
- ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ inputs.to_version_ref }}
- name: Checkout previous version of k-apps
uses: actions/checkout@v4
with:
path: apptests/${{env.UPGRADE_KAPPS_REPO_PATH}}
ref: ${{ inputs.from_version_ref }}
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: 'apptests/go.mod'
- name: Install Ginkgo
working-directory: apptests
run: go install github.com/onsi/ginkgo/v2/ginkgo
- name: Run upgrade Test
env:
SKIP_CLUSTER_TEARDOWN: "true"
working-directory: apptests
run: |
ginkgo --v --label-filter="upgrade && (${{ inputs.apps }})" appscenarios
- name: Gather support bundle
if: failure()
working-directory: apptests
run: |
curl -L https://github.com/replicatedhq/troubleshoot/releases/latest/download/support-bundle_linux_amd64.tar.gz | tar xzvf -
./support-bundle --interactive=false --output=support-bundle.tar.gz support-bundle.yaml
- name: Upload support bundle
if: failure()
uses: actions/upload-artifact@v4
with:
name: support-bundle-${{ inputs.apps }}-upgrade-${{ inputs.from_version_ref }}
path: apptests/support-bundle.tar.gz