Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test(e2e): fix checkout in e2e test workflow to test the PR's branch #22

Merged
merged 3 commits into from
Nov 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion .github/actions/e2e/cleanup/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,15 @@ inputs:
acr_name:
description: "Name of the acr holding the karpenter image"
required: true
git_ref:
description: "The git commit, tag, or branch to check out"
required: false
runs:
using: "composite"
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
ref: ${{ inputs.git_ref }}
- name: az login
uses: azure/login@v1
with:
Expand Down
7 changes: 6 additions & 1 deletion .github/actions/e2e/create-acr/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,15 @@ inputs:
acr_name:
description: "Name of the acr holding the karpenter image"
required: true
git_ref:
description: "The git commit, tag, or branch to check out"
required: false
runs:
using: "composite"
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
ref: ${{ inputs.git_ref }}
- name: az login
uses: azure/login@v1
with:
Expand Down
7 changes: 6 additions & 1 deletion .github/actions/e2e/create-cluster/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,15 @@ inputs:
acr_name:
description: "Name of the acr holding the karpenter image"
required: true
git_ref:
description: "The git commit, tag, or branch to check out"
required: false
runs:
using: "composite"
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
ref: ${{ inputs.git_ref }}
- name: az login
uses: azure/login@v1
with:
Expand Down
7 changes: 6 additions & 1 deletion .github/actions/e2e/dump-logs/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,15 @@ inputs:
cluster_name:
description: 'Name of the cluster'
required: true
git_ref:
description: "The git commit, tag, or branch to check out"
required: false
runs:
using: "composite"
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
ref: ${{ inputs.git_ref }}
- name: az login
uses: azure/login@v1
with:
Expand Down
7 changes: 6 additions & 1 deletion .github/actions/e2e/install-karpenter/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,15 @@ inputs:
acr_name:
description: "Name of the acr holding the karpenter image"
required: true
git_ref:
description: "The git commit, tag, or branch to check out"
required: false
runs:
using: "composite"
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
ref: ${{ inputs.git_ref }}
- name: az login
uses: azure/login@v1
with:
Expand Down
9 changes: 8 additions & 1 deletion .github/workflows/e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ jobs:
env:
AZURE_SUBSCRIPTION_ID: ${{ secrets.E2E_SUBSCRIPTION_ID }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
ref: ${{ inputs.git_ref }}
- if: always() && github.event_name == 'workflow_run'
uses: ./.github/actions/commit-status/start
with:
Expand Down Expand Up @@ -72,6 +74,7 @@ jobs:
subscription-id: ${{ secrets.E2E_SUBSCRIPTION_ID }}
resource_group: ${{ env.RG_NAME }}
acr_name: ${{ env.ACR_NAME }}
git_ref: ${{ inputs.git_ref }}
- name: add jitter on cluster creation
run: |
# Creating jitter so that we can stagger cluster creation to avoid throttling
Expand All @@ -91,6 +94,7 @@ jobs:
resource_group: ${{ env.RG_NAME }}
cluster_name: ${{ env.CLUSTER_NAME }}
acr_name: ${{ env.ACR_NAME }}
git_ref: ${{ inputs.git_ref }}
- name: build and publish karpenter
shell: bash
run: AZURE_ACR_NAME=${{ env.ACR_NAME }} make az-build
Expand All @@ -103,6 +107,7 @@ jobs:
resource_group: ${{ env.RG_NAME }}
cluster_name: ${{ env.CLUSTER_NAME }}
acr_name: ${{ env.ACR_NAME }}
git_ref: ${{ inputs.git_ref }}
- name: run the ${{ inputs.suite }} test suite
if: inputs.suite != 'Nonbehavioral'
run: |
Expand All @@ -117,6 +122,7 @@ jobs:
subscription-id: ${{ secrets.E2E_SUBSCRIPTION_ID }}
resource_group: ${{ env.RG_NAME }}
cluster_name: ${{ env.CLUSTER_NAME }}
git_ref: ${{ inputs.git_ref }}
- name: cleanup resources
uses: ./.github/actions/e2e/cleanup
if: always()
Expand All @@ -128,6 +134,7 @@ jobs:
resource_group: ${{ env.RG_NAME }}
cluster_name: ${{ env.CLUSTER_NAME }}
acr_name: ${{ env.ACR_NAME }}
git_ref: ${{ inputs.git_ref }}
- if: always() && github.event_name == 'workflow_run'
uses: ./.github/actions/commit-status/end
with:
Expand Down