E2EMatrix #825
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: E2EMatrix | |
on: | |
schedule: | |
- cron: '7 */8 * * *' | |
push: | |
branches: [main] | |
workflow_run: | |
workflows: [ApprovalComment] | |
types: [completed] | |
workflow_dispatch: | |
# All jobs will run under the following conditions: | |
# 1. Upstream Karpenter repo triggered the job by schedule, push, or dispatch | |
# 2. Upstream Karpenter repo triggered the job by workflow_run, which requires maintainer check to succeed | |
# 3. Downstream fork triggered the job through dispatch and has set 'ENABLE_E2E' in repo environment variables | |
jobs: | |
resolve-git-ref: | |
if: (github.repository == 'aws/karpenter' && (github.event_name != 'workflow_run' || github.event.workflow_run.conclusion == 'success')) || github.event_name == 'workflow_dispatch' | |
runs-on: ubuntu-latest | |
outputs: | |
PR_NUM: ${{ steps.resolve-step.outputs.PR_NUM }} | |
GIT_REF: ${{ steps.resolve-step.outputs.GIT_REF }} | |
steps: | |
# Download the artifact and resolve the commit if initiated by PR snapshot | |
# Otherwise, use the currently checked-out branch to run the E2E tests against | |
- uses: actions/checkout@v3 | |
with: | |
ref: ${{ inputs.git_ref }} | |
- if: github.event_name == 'workflow_run' | |
uses: ./.github/actions/download-artifact | |
- id: resolve-step | |
run: | | |
if [[ "${{ github.event_name }}" == "workflow_run" ]]; then | |
echo PR_NUM=$(head -n 1 /tmp/artifacts/metadata.txt) >> $GITHUB_OUTPUT | |
echo GIT_REF=$(tail -n 1 /tmp/artifacts/metadata.txt) >> $GITHUB_OUTPUT | |
else | |
echo PR_NUM="" >> $GITHUB_OUTPUT | |
echo GIT_REF="" >> $GITHUB_OUTPUT | |
fi | |
e2e: | |
needs: [resolve-git-ref] | |
if: (github.repository == 'aws/karpenter' && (github.event_name != 'workflow_run' || github.event.workflow_run.conclusion == 'success')) || github.event_name == 'workflow_dispatch' | |
strategy: | |
fail-fast: false | |
matrix: | |
suite: [Integration, Machine, Consolidation, Utilization, Interruption, Drift, Chaos, IPv6] | |
uses: ./.github/workflows/e2e.yaml | |
with: | |
suite: ${{ matrix.suite }} | |
git_ref: ${{ needs.resolve-git-ref.outputs.GIT_REF }} | |
pr_number: ${{ needs.resolve-git-ref.outputs.PR_NUM }} | |
event_name: ${{ github.event_name }} | |
secrets: | |
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} | |
e2e-upgrade: | |
needs: [resolve-git-ref] | |
if: (github.repository == 'aws/karpenter' && (github.event_name != 'workflow_run' || github.event.workflow_run.conclusion == 'success')) || github.event_name == 'workflow_dispatch' | |
uses: ./.github/workflows/e2e-upgrade.yaml | |
with: | |
from_git_ref: v0.28.0 | |
to_git_ref: ${{ needs.resolve-git-ref.outputs.GIT_REF }} | |
pr_number: ${{ needs.resolve-git-ref.outputs.PR_NUM }} | |
event_name: ${{ github.event_name }} | |
secrets: | |
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} |