Skip to content

Commit a3243e7

Browse files
committed
wip: Run less e2e matrix by default
But add a way to run all of them with a comment. Signed-off-by: Vincent Demeester <[email protected]>
1 parent ec2f685 commit a3243e7

File tree

2 files changed

+130
-53
lines changed

2 files changed

+130
-53
lines changed
Lines changed: 126 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
1+
name: Tekton Integration (Backcompat)
2+
3+
on:
4+
issue_comment:
5+
types: [created, edited]
6+
7+
permissions:
8+
contents: read
9+
pull-requests: read
10+
11+
defaults:
12+
run:
13+
shell: bash
14+
15+
jobs:
16+
run-if-requested:
17+
if: ${{ github.event.issue.pull_request && contains(github.event.comment.body, '/run-backcompat-e2e') }}
18+
runs-on: ubuntu-latest
19+
steps:
20+
- name: Set PR variables
21+
id: pr
22+
uses: actions/github-script@60a0d83039c74a4aee5e5cbf49f72e2045aa4292 # v7.0.1
23+
with:
24+
script: |
25+
const pr = await github.rest.pulls.get({
26+
owner: context.repo.owner,
27+
repo: context.repo.repo,
28+
pull_number: context.issue.number
29+
});
30+
core.setOutput('sha', pr.data.head.sha);
31+
outputs:
32+
sha: ${{ steps.pr.outputs.sha }}
33+
34+
backcompat-e2e:
35+
needs: [run-if-requested]
36+
if: ${{ needs.run-if-requested.result == 'success' }}
37+
concurrency:
38+
group: ${{ github.workflow }}-${{ matrix.os }}-${{ matrix.k8s-name }}-${{ matrix.feature-flags }}-${{ github.event.issue.number }}
39+
cancel-in-progress: true
40+
name: e2e tests (backcompat)
41+
runs-on: ${{ matrix.os }}
42+
strategy:
43+
fail-fast: false
44+
matrix:
45+
os:
46+
- ubuntu-latest
47+
- ubuntu-24.04-arm
48+
k8s-name:
49+
- k8s-latest-minus-five # 1.29
50+
- k8s-latest-minus-four # 1.30
51+
- k8s-latest-minus-three # 1.31
52+
- k8s-latest-minus-two # 1.32
53+
- k8s-latest-minus-one # 1.33
54+
feature-flags: [stable]
55+
include:
56+
- k8s-name: k8s-latest-minus-five
57+
k8s-version: v1.29.x
58+
- k8s-name: k8s-latest-minus-four
59+
k8s-version: v1.30.x
60+
- k8s-name: k8s-latest-minus-three
61+
k8s-version: v1.31.x
62+
- k8s-name: k8s-latest-minus-two
63+
k8s-version: v1.32.x
64+
- k8s-name: k8s-latest-minus-one
65+
k8s-version: v1.33.x
66+
exclude:
67+
- os: ubuntu-24.04-arm
68+
env:
69+
KO_DOCKER_REPO: registry.local:5000/tekton
70+
CLUSTER_DOMAIN: c${{ github.run_id }}.local
71+
ARTIFACTS: ${{ github.workspace }}/artifacts
72+
steps:
73+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
74+
with:
75+
ref: ${{ needs.run-if-requested.outputs.sha }}
76+
- uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0
77+
with:
78+
go-version-file: "go.mod"
79+
- uses: ko-build/setup-ko@d006021bd0c28d1ce33a07e7943d48b079944c8d # v0.9
80+
81+
- name: Install Dependencies
82+
run: |
83+
echo '::group:: install go-junit-report'
84+
go install github.com/jstemmer/[email protected]
85+
echo '::endgroup::'
86+
echo '::group:: created required folders'
87+
mkdir -p "${ARTIFACTS}"
88+
echo '::endgroup::'
89+
echo "${GOPATH}/bin" >> "$GITHUB_PATH"
90+
91+
- name: Run tests (backcompat)
92+
run: |
93+
export PATH="$(echo "$PATH" | sed -e 's/^\/bin://'):/bin"
94+
export KO_DEFAULTPLATFORMS=linux/$(go env GOARCH)
95+
./hack/setup-kind.sh \
96+
--registry-url $(echo ${KO_DOCKER_REPO} | cut -d'/' -f 1) \
97+
--cluster-suffix c${{ github.run_id }}.local \
98+
--nodes 3 \
99+
--k8s-version ${{ matrix.k8s-version }} \
100+
--e2e-script ./test/e2e-tests.sh \
101+
--e2e-env ./test/e2e-tests-kind-${{ matrix.feature-flags }}.env
102+
103+
- name: Upload test results
104+
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
105+
with:
106+
name: backcompat-${{ matrix.k8s-version }}-${{ matrix.feature-flags }}
107+
path: ${{ env.ARTIFACTS }}
108+
109+
- uses: chainguard-dev/actions/kind-diag@6f4f4de7549514e7b659741b30f6476f245600dd # v1.5.3
110+
if: ${{ failure() }}
111+
with:
112+
artifact-name: backcompat-${{ matrix.k8s-version }}-${{ matrix.feature-flags }}-logs
113+
114+
- name: Dump Artifacts
115+
if: ${{ failure() }}
116+
run: |
117+
if [[ -d ${{ env.ARTIFACTS }} ]]; then
118+
cd ${{ env.ARTIFACTS }}
119+
for x in $(find . -type f); do
120+
echo "::group:: artifact $x"
121+
cat $x
122+
echo '::endgroup::'
123+
done
124+
fi
125+
126+

.github/workflows/e2e-matrix.yml

Lines changed: 4 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,6 @@ jobs:
2323

2424
k8s-name:
2525
- k8s-oldest # 1.28
26-
- k8s-latest-minus-five # 1.29
27-
- k8s-latest-minus-four # 1.30
28-
- k8s-latest-minus-three # 1.31
29-
- k8s-latest-minus-two # 1.32
30-
- k8s-latest-minus-one # 1.33
3126
- k8s-latest # 1.34
3227

3328
feature-flags:
@@ -38,60 +33,16 @@ jobs:
3833
include:
3934
- k8s-name: k8s-oldest
4035
k8s-version: v1.28.x
41-
- k8s-name: k8s-latest-minus-five
42-
k8s-version: v1.29.x
43-
- k8s-name: k8s-latest-minus-four
44-
k8s-version: v1.30.x
45-
- k8s-name: k8s-latest-minus-three
46-
k8s-version: v1.31.x
47-
- k8s-name: k8s-latest-minus-two
48-
k8s-version: v1.32.x
49-
- k8s-name: k8s-latest-minus-one
50-
k8s-version: v1.33.x
5136
- k8s-name: k8s-latest
5237
k8s-version: v1.34.x
38+
- k8s-name: k8s-latest
39+
feature-flags: stable
40+
os: ubuntu-24.04-arm
5341

54-
# Run beta and alpha only on latest and oldest
42+
# Limit arm64: only run k8s-latest on arm64 (alpha and beta), skip oldest on arm64
5543
exclude:
56-
- k8s-name: k8s-latest-minus-five
57-
feature-flags: beta
58-
- k8s-name: k8s-latest-minus-five
59-
feature-flags: alpha
60-
- k8s-name: k8s-latest-minus-four
61-
feature-flags: beta
62-
- k8s-name: k8s-latest-minus-four
63-
feature-flags: alpha
64-
- k8s-name: k8s-latest-minus-three
65-
feature-flags: beta
66-
- k8s-name: k8s-latest-minus-three
67-
feature-flags: alpha
68-
- k8s-name: k8s-latest-minus-two
69-
feature-flags: beta
70-
- k8s-name: k8s-latest-minus-two
71-
feature-flags: alpha
72-
- k8s-name: k8s-latest-minus-one
73-
feature-flags: beta
74-
- k8s-name: k8s-latest-minus-one
75-
feature-flags: alpha
76-
# Only run latest on arm64
7744
- k8s-name: k8s-oldest
7845
os: ubuntu-24.04-arm
79-
- k8s-name: k8s-latest-minus-five
80-
os: ubuntu-24.04-arm
81-
- k8s-name: k8s-latest-minus-four
82-
os: ubuntu-24.04-arm
83-
- k8s-name: k8s-latest-minus-three
84-
os: ubuntu-24.04-arm
85-
- k8s-name: k8s-latest-minus-two
86-
os: ubuntu-24.04-arm
87-
- k8s-name: k8s-latest-minus-one
88-
os: ubuntu-24.04-arm
89-
- k8s-name: k8s-latest
90-
feature-flags: alpha
91-
os: ubuntu-24.04-arm
92-
- k8s-name: k8s-latest
93-
feature-flags: beta
94-
os: ubuntu-24.04-arm
9546
env:
9647
KO_DOCKER_REPO: registry.local:5000/tekton
9748
CLUSTER_DOMAIN: c${{ github.run_id }}.local

0 commit comments

Comments
 (0)