Skip to content

Commit

Permalink
ci: Add commit status for conformance PR runs (aws#4647)
Browse files Browse the repository at this point in the history
  • Loading branch information
engedaam authored Sep 19, 2023
1 parent 7465361 commit f87c452
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 6 deletions.
4 changes: 1 addition & 3 deletions .github/actions/e2e/slack/notify/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/e2e-conformance-trigger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
1 change: 1 addition & 0 deletions .github/workflows/e2e-matrix-trigger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
3 changes: 3 additions & 0 deletions .github/workflows/e2e-matrix.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ on:
event_name:
type: string
required: true
workflow_trigger:
type: string
secrets:
SLACK_WEBHOOK_URL:
required: true
Expand Down Expand Up @@ -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:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/e2e-scale-trigger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
7 changes: 5 additions & 2 deletions .github/workflows/e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:
options:
- "us-east-2"
- "us-west-2"
- "eu-west-1"
default: "us-east-2"
suite:
type: choice
Expand Down Expand Up @@ -55,6 +56,8 @@ on:
enable_metrics:
type: boolean
default: false
workflow_trigger:
type: string
secrets:
SLACK_WEBHOOK_URL:
required: true
Expand All @@ -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
Expand Down Expand Up @@ -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 }}
Expand Down

0 comments on commit f87c452

Please sign in to comment.