diff --git a/.github/actions/e2e/cleanup/action.yaml b/.github/actions/e2e/cleanup/action.yaml index 3220a252b..9a92a20fa 100644 --- a/.github/actions/e2e/cleanup/action.yaml +++ b/.github/actions/e2e/cleanup/action.yaml @@ -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: diff --git a/.github/actions/e2e/create-acr/action.yaml b/.github/actions/e2e/create-acr/action.yaml index d61c7fd0c..3c390e362 100644 --- a/.github/actions/e2e/create-acr/action.yaml +++ b/.github/actions/e2e/create-acr/action.yaml @@ -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: diff --git a/.github/actions/e2e/create-cluster/action.yaml b/.github/actions/e2e/create-cluster/action.yaml index 4a28e1b0c..dc92ae5f7 100644 --- a/.github/actions/e2e/create-cluster/action.yaml +++ b/.github/actions/e2e/create-cluster/action.yaml @@ -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: diff --git a/.github/actions/e2e/dump-logs/action.yaml b/.github/actions/e2e/dump-logs/action.yaml index 64ffe13f6..4b1b1a191 100644 --- a/.github/actions/e2e/dump-logs/action.yaml +++ b/.github/actions/e2e/dump-logs/action.yaml @@ -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: diff --git a/.github/actions/e2e/install-karpenter/action.yaml b/.github/actions/e2e/install-karpenter/action.yaml index 2a122f93c..6d48603c6 100644 --- a/.github/actions/e2e/install-karpenter/action.yaml +++ b/.github/actions/e2e/install-karpenter/action.yaml @@ -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: diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index 08bd3ef66..f8c8a113e 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -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: @@ -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 @@ -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 @@ -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: | @@ -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() @@ -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: