Expose statsconfig tags 1.14 #15832
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: CI | |
on: pull_request | |
env: | |
VERSION: '1.0.0-ci' | |
GITHUB_TOKEN: ${{ github.token }} # necessary to pass upgrade tests | |
jobs: | |
prepare_env: | |
name: Prepare Environment | |
runs-on: ubuntu-22.04 | |
outputs: | |
should-run-regression-tests: ${{ steps.regression-tests.outputs.run_value }} | |
should-pass-regression-tests: ${{ steps.regression-tests.outputs.pass_value }} | |
steps: | |
- name: Cancel Previous Actions | |
uses: styfle/cancel-workflow-action@0.11.0 | |
with: | |
access_token: ${{ github.token }} | |
- id: is-draft-pr | |
name: Process draft Pull Requests | |
if: ${{ github.event.pull_request.draft }} | |
run: echo "value=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=${{ 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=${{ 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=$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 | |
strategy: | |
fail-fast: false | |
matrix: | |
kube-e2e-test-type: ['gateway', 'gloo', 'ingress', 'helm', 'gloomtls', 'glooctl', 'upgrade', 'istio'] | |
kube-version: [{ node: 'v1.25.3@sha256:f52781bc0d7a19fb6c405c2af83abfeb311f130707a0e219175677e366cc45d1', kubectl: 'v1.25.8', kind: 'v0.17.0', helm: 'v3.11.2' }] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: ./.github/actions/regression-tests | |
notify_slack: | |
runs-on: ubuntu-22.04 | |
if: ${{ github.event_name == 'pull_request' && failure() }} | |
needs: [ regression_tests ] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-go@v4 | |
with: | |
go-version-file: go.mod | |
- 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 |