bump bitnami/kubectl, cloud-builders #23120
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Regression Tests | |
on: pull_request | |
jobs: | |
prepare_env: | |
name: Prepare Environment | |
runs-on: ubuntu-22.04 | |
timeout-minutes: 5 | |
outputs: | |
should-run-regression-tests: ${{ steps.regression-tests.outputs.run_value }} | |
steps: | |
- name: Cancel Previous Actions | |
uses: styfle/[email protected] | |
with: | |
access_token: ${{ github.token }} | |
- id: is-draft-pr | |
name: Process draft Pull Requests | |
if: ${{ github.event.pull_request.draft }} | |
run: echo "value=$(echo true)" >> $GITHUB_OUTPUT | |
- id: signal-ci-comment | |
name: Process comments on Pull Request to signal CI | |
if: ${{ github.event.issue.pull_request }} | |
run: | | |
echo "value=$(echo ${{ contains(github.event.comment.body, '/sig-ci') }})" >> $GITHUB_OUTPUT | |
- id: skip-ci-comment | |
name: Process comments on Pull Request to skip CI | |
if: ${{ github.event.issue.pull_request }} | |
run: echo "value=$(echo ${{ contains(github.event.comment.body, '/skip-ci') }})" >> $GITHUB_OUTPUT | |
- id: regression-tests | |
name: Determine how to run regression tests | |
run: | | |
should_run=true | |
is_draft_pr=${{ steps.is-draft-pr.outputs.value }} | |
if [[ ! -z $is_draft_pr && $is_draft_pr = true ]] ; then | |
should_run=false | |
fi | |
pr_comment_signal=${{ steps.signal-ci-comment.outputs.value }} | |
if [[ ! -z $pr_comment_signal && $pr_comment_signal = true ]] ; then | |
should_run=true | |
fi | |
pr_comment_skip=${{ steps.skip-ci-comment.outputs.value }} | |
if [[ ! -z $pr_comment_skip && $pr_comment_skip = true ]] ; then | |
should_run=false | |
fi | |
echo "Should run regression tests? $should_run" | |
echo "run_value=$(echo $should_run)" >> $GITHUB_OUTPUT | |
regression_tests: | |
name: k8s regression tests (${{matrix.kube-e2e-test-type}}) | |
needs: prepare_env | |
if: needs.prepare_env.outputs.should-run-regression-tests == 'true' | |
runs-on: ubuntu-22.04 | |
timeout-minutes: 60 | |
strategy: | |
fail-fast: false | |
matrix: | |
kube-e2e-test-type: ['gateway', 'gloo', 'ingress', 'helm', 'gloomtls', 'glooctl', 'upgrade', 'istio'] | |
kube-version: [{ node: 'v1.24.7@sha256:5c015142d9b60a0f6c45573f809957076514e38ec973565e2b2fe828b91597f5', kubectl: 'v1.24.7', kind: 'v0.17.0'}] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: ./.github/workflows/composite-actions/regression-tests | |
notify_slack: | |
runs-on: ubuntu-22.04 | |
timeout-minutes: 5 | |
if: ${{ github.event_name == 'pull_request' && failure() }} | |
needs: [ regression_tests ] | |
steps: | |
- name: Check out code into the Go module directory | |
uses: actions/checkout@v3 | |
- name: Prep Go Runner | |
uses: ./.github/workflows/composite-actions/prep-go-runner | |
- uses: actions/download-artifact@v3 | |
- name: Set pull_request_url | |
run: echo "pull_request_url=$(cat ${{ github.event_path }} | jq --raw-output .pull_request._links.html.href)" >> $GITHUB_ENV | |
- name: Set direct_message_id | |
run: echo "direct_message_id=$(cat ./.github/workflows/notify-on-regression-failure-list.json | jq -r '."${{ github.actor }}"')" >> $GITHUB_ENV | |
- name: send slack message | |
env: | |
PARENT_JOB_URL: ${{ env.pull_request_url }} # parent job hyperlink | |
PREAMBLE: "Your recent Gloo PR regression tests" # text to hyperlink at start of slack message | |
SLACK_CHANNEL: ${{ env.direct_message_id }} # DM to the user who ran CI | |
SLACKBOT_BEARER: ${{ secrets.SLACKBOT_BEARER }} | |
run: | | |
test_results="$(cat */test-out.json | jq -c --slurp .)" | |
echo $test_results | |
go run .github/workflows/helpers/notify-from-json.go $test_results |