From f87c452e0c0d6c4b69037ea7d7991eb9b1e91f5f Mon Sep 17 00:00:00 2001 From: Amanuel Engeda <74629455+engedaam@users.noreply.github.com> Date: Mon, 18 Sep 2023 19:25:23 -0700 Subject: [PATCH] ci: Add commit status for conformance PR runs (#4647) --- .github/actions/e2e/slack/notify/action.yaml | 4 +--- .github/workflows/e2e-conformance-trigger.yaml | 3 ++- .github/workflows/e2e-matrix-trigger.yaml | 1 + .github/workflows/e2e-matrix.yaml | 3 +++ .github/workflows/e2e-scale-trigger.yaml | 1 + .github/workflows/e2e.yaml | 7 +++++-- 6 files changed, 13 insertions(+), 6 deletions(-) diff --git a/.github/actions/e2e/slack/notify/action.yaml b/.github/actions/e2e/slack/notify/action.yaml index 51d6290378dc..17af16abb864 100644 --- a/.github/actions/e2e/slack/notify/action.yaml +++ b/.github/actions/e2e/slack/notify/action.yaml @@ -22,9 +22,7 @@ runs: ref: ${{ inputs.git_ref }} - shell: bash run: | - if [[ ${{ inputs.event_name }} == "conformance" ]]; then - RUN_NAME="conformance-periodic-${{ inputs.k8s_version }}-${{ inputs.suite }}" - elif [[ ${{ inputs.event_name }} == "schedule" ]]; then + if [[ ${{ inputs.event_name }} == "schedule" ]]; then RUN_NAME="${{ inputs.suite }}-periodic" else RUN_NAME="${{ inputs.suite }}-${GITHUB_SHA::7}" diff --git a/.github/workflows/e2e-conformance-trigger.yaml b/.github/workflows/e2e-conformance-trigger.yaml index 83f4adb8d0bd..e8b86997bccb 100644 --- a/.github/workflows/e2e-conformance-trigger.yaml +++ b/.github/workflows/e2e-conformance-trigger.yaml @@ -23,8 +23,9 @@ jobs: k8s_version: [ "1.23", "1.24", "1.25", "1.26", "1.27" ] uses: ./.github/workflows/e2e-matrix.yaml with: - event_name: conformance + event_name: ${{ github.event_name }} region: "eu-west-1" k8s_version: ${{ matrix.k8s_version }} + workflow_trigger: "conformance" secrets: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} \ No newline at end of file diff --git a/.github/workflows/e2e-matrix-trigger.yaml b/.github/workflows/e2e-matrix-trigger.yaml index 3654b25ee324..b7e1075365a7 100644 --- a/.github/workflows/e2e-matrix-trigger.yaml +++ b/.github/workflows/e2e-matrix-trigger.yaml @@ -22,5 +22,6 @@ jobs: with: event_name: ${{ github.event_name }} git_ref: ${{ needs.resolve.outputs.GIT_REF }} + workflow_trigger: "matrix" secrets: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} \ No newline at end of file diff --git a/.github/workflows/e2e-matrix.yaml b/.github/workflows/e2e-matrix.yaml index 7fc602f70e78..e33373856a37 100644 --- a/.github/workflows/e2e-matrix.yaml +++ b/.github/workflows/e2e-matrix.yaml @@ -13,6 +13,8 @@ on: event_name: type: string required: true + workflow_trigger: + type: string secrets: SLACK_WEBHOOK_URL: required: true @@ -50,6 +52,7 @@ jobs: event_name: ${{ inputs.event_name }} region: ${{ inputs.region }} k8s_version: ${{ inputs.k8s_version }} + workflow_trigger: ${{ inputs.workflow_trigger }} secrets: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} e2e-upgrade: diff --git a/.github/workflows/e2e-scale-trigger.yaml b/.github/workflows/e2e-scale-trigger.yaml index 7472cb870852..2778ea6bbcb1 100644 --- a/.github/workflows/e2e-scale-trigger.yaml +++ b/.github/workflows/e2e-scale-trigger.yaml @@ -23,5 +23,6 @@ jobs: git_ref: ${{ needs.resolve.outputs.GIT_REF }} region: "us-west-2" enable_metrics: true + workflow_trigger: "scale" secrets: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} \ No newline at end of file diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index e609f31567cc..aa03fad5e0f9 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -9,6 +9,7 @@ on: options: - "us-east-2" - "us-west-2" + - "eu-west-1" default: "us-east-2" suite: type: choice @@ -55,6 +56,8 @@ on: enable_metrics: type: boolean default: false + workflow_trigger: + type: string secrets: SLACK_WEBHOOK_URL: required: true @@ -73,7 +76,7 @@ jobs: - if: always() && inputs.event_name == 'workflow_run' uses: ./.github/actions/commit-status/start with: - name: "${{ github.workflow }} / e2e (${{ inputs.suite }}) / ${{ github.job }} (snapshot)" + name: ${{ github.workflow }} (${{ inputs.k8s_version }}) / e2e (${{ inputs.suite }}) git_ref: ${{ inputs.git_ref }} - uses: ./.github/actions/install-deps - name: configure aws credentials @@ -124,7 +127,7 @@ jobs: TEST_SUITE="${{ inputs.suite }}" ENABLE_METRICS=${{ inputs.enable_metrics }} METRICS_REGION=${{ vars.TIMESTREAM_REGION }} GIT_REF="$(git rev-parse HEAD)" make e2etests - name: notify slack of success or failure uses: ./.github/actions/e2e/slack/notify - if: (success() || failure()) && inputs.event_name != 'workflow_run' && inputs.event_name != 'conformance' + if: (success() || failure()) && inputs.event_name != 'workflow_run' && inputs.workflow_trigger != 'conformance' with: url: ${{ secrets.SLACK_WEBHOOK_URL }} suite: ${{ inputs.suite }}