|
| 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 | +
|
0 commit comments