Skip to content

Commit 6eb568d

Browse files
committed
chore: referencing the setup-kind script in the plumbing repo instead of copying it
Signed-off-by: Shubham Bhardwaj <shubbhar@redhat.com>
1 parent 479cc09 commit 6eb568d

2 files changed

Lines changed: 42 additions & 364 deletions

File tree

.github/workflows/e2e-matrix.yml

Lines changed: 42 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,14 @@ jobs:
1818
fail-fast: false # Keep running if one leg fails.
1919
matrix:
2020
k8s-name:
21-
- k8s-oldest
22-
- k8s-plus-one
21+
- k8s-oldest
22+
- k8s-plus-one
2323

2424
include:
25-
- k8s-name: k8s-oldest
26-
k8s-version: v1.28.x
27-
- k8s-name: k8s-plus-one
28-
k8s-version: v1.29.x
25+
- k8s-name: k8s-oldest
26+
k8s-version: v1.28.x
27+
- k8s-name: k8s-plus-one
28+
k8s-version: v1.29.x
2929
env:
3030
KO_DOCKER_REPO: registry.local:5000/tekton
3131
CLUSTER_DOMAIN: c${{ github.run_id }}.local
@@ -38,28 +38,34 @@ jobs:
3838
go-version-file: "go.mod"
3939
- uses: ko-build/setup-ko@d006021bd0c28d1ce33a07e7943d48b079944c8d # v0.9
4040

41-
- name: Install Dependencies
42-
working-directory: ./
43-
run: |
44-
echo '::group:: install go-junit-report'
45-
go install github.com/jstemmer/go-junit-report@v0.9.1
46-
echo '::endgroup::'
41+
- name: Install Dependencies
42+
working-directory: ./
43+
run: |
44+
echo '::group:: install go-junit-report'
45+
go install github.com/jstemmer/go-junit-report@v0.9.1
46+
echo '::endgroup::'
47+
echo '::group:: created required folders'
48+
mkdir -p "${ARTIFACTS}"
49+
echo '::endgroup::'
50+
echo "${GOPATH}/bin" >> "$GITHUB_PATH"
4751
48-
echo '::group:: created required folders'
49-
mkdir -p "${ARTIFACTS}"
50-
echo '::endgroup::'
52+
- name: Run tests
53+
run: |
54+
curl -sSfL https://raw.githubusercontent.com/tektoncd/plumbing/main/tekton/images/kind-e2e/setup-kind.sh -o setup-kind.sh
55+
chmod +x setup-kind.sh
5156
52-
echo "${GOPATH}/bin" >> "$GITHUB_PATH"
57+
# Patch outdated MetalLB version (v0.9.3 -> v0.13.10)
58+
# v0.9.3 uses PodSecurityPolicy which was removed in Kubernetes 1.25+
59+
sed -i.bak 's|kubectl apply -f https://raw.githubusercontent.com/metallb/metallb/v0.9.3/manifests/namespace.yaml|kubectl apply -f https://raw.githubusercontent.com/metallb/metallb/v0.13.10/config/manifests/metallb-native.yaml|g' setup-kind.sh
60+
sed -i.bak '/kubectl apply -f.*metallb\/v0.9.3.*metallb.yaml/d' setup-kind.sh
5361
54-
- name: Run tests
55-
run: |
56-
./hack/setup-kind.sh \
57-
--registry-url $(echo ${KO_DOCKER_REPO} | cut -d'/' -f 1) \
58-
--cluster-suffix c${{ github.run_id }}.local \
59-
--nodes 3 \
60-
--k8s-version ${{ matrix.k8s-version }} \
61-
--e2e-script ./test/e2e-tests.sh \
62-
--e2e-env ./test/e2e-tests-kind-prow.env
62+
./setup-kind.sh \
63+
--registry-url $(echo ${KO_DOCKER_REPO} | cut -d'/' -f 1) \
64+
--cluster-suffix c${{ github.run_id }}.local \
65+
--nodes 3 \
66+
--k8s-version ${{ matrix.k8s-version }} \
67+
--e2e-script ./test/e2e-tests.sh \
68+
--e2e-env ./test/e2e-tests-kind-prow.env
6369
6470
- name: Upload test results
6571
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
@@ -72,14 +78,14 @@ jobs:
7278
with:
7379
artifact-name: ${{ matrix.k8s-version }}-${{ matrix.feature-flags }}-logs
7480

75-
- name: Dump Artifacts
76-
if: ${{ failure() }}
77-
run: |
78-
if [[ -d ${{ env.ARTIFACTS }} ]]; then
79-
cd ${{ env.ARTIFACTS }}
80-
for x in $(find . -type f); do
81-
echo "::group:: artifact $x"
82-
cat $x
83-
echo '::endgroup::'
84-
done
85-
fi
81+
- name: Dump Artifacts
82+
if: ${{ failure() }}
83+
run: |
84+
if [[ -d ${{ env.ARTIFACTS }} ]]; then
85+
cd ${{ env.ARTIFACTS }}
86+
for x in $(find . -type f); do
87+
echo "::group:: artifact $x"
88+
cat $x
89+
echo '::endgroup::'
90+
done
91+
fi

0 commit comments

Comments
 (0)