Skip to content

Commit 5ef4c94

Browse files
committed
ci: fix the nightly test runs
1 parent 0c94589 commit 5ef4c94

File tree

3 files changed

+106
-14
lines changed

3 files changed

+106
-14
lines changed

.github/actions/generate-chart-matrix-nightly/action.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ runs:
4040
echo " - version: ${camunda_version}" >> matrix_versions.txt
4141
echo " case: nightly" >> matrix_versions.txt
4242
echo " scenario: $(echo "$nightlyScenario" | yq e '.name' -)" >> matrix_versions.txt
43+
echo " shortname: $(echo "$nightlyScenario" | yq e '.shortname' -)" >> matrix_versions.txt
4344
echo " auth: $(echo "$nightlyScenario" | yq e '.auth' -)" >> matrix_versions.txt
4445
echo " exclude: $(echo "$nightlyScenario" | yq e '.exclude | join("|")' -)" >> matrix_versions.txt
4546
echo " values-enterprise: $(echo "$nightlyScenario" | yq e '.enterprise // "false"' -)" >> matrix_versions.txt

.github/workflows/test-chart-version-nightly-template.yaml

Lines changed: 66 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,40 @@ on:
2929
required: false
3030
default: "false"
3131
type: string
32+
platforms:
33+
description: The deployment cloud platform
34+
required: true
35+
type: string
36+
shortname:
37+
description: Shortname for the scenario within the identifier
38+
required: true
39+
type: string
40+
run-all-e2e-tests:
41+
description: "Run all E2E tests (playwright)"
42+
required: false
43+
default: false
44+
type: boolean
45+
platforms:
46+
description: The deployment cloud platform
47+
default: gke
48+
required: false
49+
type: string
50+
flows:
51+
description: The flows to run
52+
default: "install,upgrade"
53+
type: string
54+
required: false
55+
e2e-enabled:
56+
required: false
57+
default: true
58+
type: boolean
59+
deployment-ttl:
60+
required: false
61+
default: 1h
62+
type: string
3263

3364
concurrency:
34-
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-${{ inputs.scenario }}-${{ inputs.camunda-version }}-${{ inputs.auth }}-${{ inputs.exclude }}
65+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-${{ inputs.shortname }}-${{ inputs.camunda-version }}-${{ inputs.auth }}-${{ inputs.exclude }}-${{ inputs.platforms }}
3566
cancel-in-progress: true
3667

3768
permissions:
@@ -46,23 +77,47 @@ jobs:
4677
camunda-helm-dir: "camunda-platform-${{ inputs.camunda-version }}"
4778
camunda-helm-git-ref: "${{ github.event.pull_request.head.sha }}"
4879

80+
parse-platforms:
81+
name: Parse platforms
82+
runs-on: ubuntu-latest
83+
env:
84+
SCENARIOS_LIST: ${{ inputs.scenarios }}
85+
outputs:
86+
platforms: ${{ steps.make-json-array.outputs.platforms }}
87+
steps:
88+
- name: Convert string to JSON array and set as output
89+
id: make-json-array
90+
run: |
91+
platforms="${{ inputs.platforms }}"
92+
echo "platforms=$(jq -cn --arg p "$platforms" '$p | split(",")')" >> "$GITHUB_OUTPUT"
93+
echo "platforms=$platforms"
94+
4995
integration:
50-
name: Camunda ${{ inputs.camunda-version }} - ${{ matrix.scenario }}
51-
needs: validation
96+
name: ${{ matrix.platform }} - ITs
97+
needs: [validation, parse-platforms]
5298
permissions:
5399
contents: read
54100
id-token: write
55101
deployments: write
56102
secrets: inherit
103+
strategy:
104+
matrix:
105+
platform: ${{ fromJson(needs.parse-platforms.outputs.platforms) }}
57106
uses: ./.github/workflows/test-integration-template.yaml
58107
with:
59-
identifier: "${{ inputs.camunda-version }}"
60-
platforms: "gke"
61-
flows: "install,upgrade"
108+
identifier: "${{ github.event.pull_request.number || git.ref }}-intg-${{ inputs.camunda-version }}-${{ matrix.platform }}"
109+
deployment-ttl: "${{ contains(github.event.pull_request.labels.*.name, 'test-persistent') && '1w' || inputs.deployment-ttl }}"
110+
flows: ${{ inputs.flows }}
62111
camunda-helm-dir: "camunda-platform-${{ inputs.camunda-version }}"
63-
test-case: "${{ inputs.case }}"
64-
scenario: "${{ inputs.scenario }}"
65-
auth: "${{ inputs.auth }}"
66-
exclude: "${{ inputs.exclude }}"
67-
values-enterprise: "${{ inputs.values-enterprise }}"
68112
camunda-helm-git-ref: "${{ github.event.pull_request.head.sha }}"
113+
caller-git-ref: "${{ github.event.pull_request.head.sha }}"
114+
test-case: ${{inputs.case}}
115+
scenario: ${{inputs.scenario}}
116+
e2e-enabled: ${{ inputs.e2e-enabled }}
117+
shortname: ${{inputs.shortname}}
118+
auth: ${{inputs.auth}}
119+
exclude: ${{inputs.exclude}}
120+
platforms: ${{ matrix.platform }}
121+
run-all-e2e-tests: ${{ inputs.run-all-e2e-tests }}
122+
always-delete-namespace: true
123+
values-enterprise: "${{ inputs.values-enterprise }}"

.github/workflows/test-chart-version-nightly.yaml

Lines changed: 39 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,41 @@ on:
55
schedule:
66
# Set the cron schedule to run nightly at midnight US time, EST (4AM UTC)
77
- cron: "0 4 * * *"
8+
pull_request:
9+
paths:
10+
- ".github/workflows/test-chart-version-nightly-template.yaml"
11+
- ".github/workflows/test-chart-version-nightly.yaml"
12+
- ".github/workflows/test-integration-template.yaml"
13+
- ".github/workflows/test-integration-runner.yaml"
14+
- ".github/charts/*/test/ci-test-config.yaml"
815
push:
916
branches:
1017
- "feature/ee-images-prem"
18+
workflow_dispatch:
19+
inputs:
20+
platforms:
21+
description: The deployment cloud platform
22+
default: "gke"
23+
required: false
24+
type: choice
25+
options:
26+
- gke
27+
- eks
28+
- rosa
29+
- gke,eks
30+
flows:
31+
description: The flows to run
32+
default: "install"
33+
required: false
34+
type: choice
35+
options:
36+
- install
37+
- upgrade
38+
- install,upgrade
39+
deployment-ttl:
40+
required: false
41+
default: 1h
42+
type: string
1143

1244
concurrency:
1345
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.run_id }}
@@ -32,10 +64,10 @@ jobs:
3264
id: generate-chart-versions
3365
uses: ./.github/actions/generate-chart-matrix-nightly
3466

35-
test:
67+
integation-tests:
68+
name: ${{ matrix.version }} - ${{ inputs.platforms || 'gke' }} - ${{ matrix.case }} - ${{ matrix.shortname }}
3669
if: ${{ needs.init.outputs.matrix != '[]' }}
37-
name: Camunda ${{ matrix.version }}
38-
needs: init
70+
needs: [init, matrix-version-only, validation]
3971
strategy:
4072
fail-fast: false
4173
matrix: ${{ fromJson(needs.init.outputs.matrix) }}
@@ -45,6 +77,10 @@ jobs:
4577
camunda-version: ${{ matrix.version }}
4678
case: ${{ matrix.case }}
4779
scenario: ${{ matrix.scenario }}
80+
shortname: ${{ matrix.shortname }}
4881
auth: ${{ matrix.auth }}
82+
platforms: ${{ inputs.platforms || 'gke,eks' }}
4983
exclude: ${{ matrix.exclude }}
84+
flows: ${{ inputs.flows || 'install,upgrade' }}
85+
deployment-ttl: ${{ inputs.deployment-ttl || '1h' }}
5086
values-enterprise: ${{ matrix.values-enterprise }}

0 commit comments

Comments
 (0)