test: changing aks version to default #679
Workflow file for this run
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: aks-addon-e2e-tests | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
on: | |
pull_request_target: | |
branches: [master] | |
paths-ignore: ['docs/**', '**.md', '**.mdx', '**.png', '**.jpg'] | |
push: | |
branches: [master] | |
paths-ignore: ['docs/**', '**.md', '**.mdx', '**.png', '**.jpg'] | |
permissions: | |
id-token: write | |
contents: read | |
env: | |
REGISTRY: ghcr.io | |
# Common versions | |
GO_VERSION: '1.20' | |
jobs: | |
export-registry: | |
runs-on: ubuntu-20.04 | |
outputs: | |
registry: ${{ steps.export.outputs.registry }} | |
steps: | |
- id: export | |
run: | | |
# registry must be in lowercase | |
echo "::set-output name=registry::$(echo "${{ env.REGISTRY }}/${{ github.repository }}" | tr [:upper:] [:lower:])" | |
aks-addon-e2e-tests: | |
needs: export-registry | |
environment: test | |
env: | |
REGISTRY: ${{ needs.export-registry.outputs.registry }} | |
E2E_IMG_TAG: "e2e-ci" | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Set up Go ${{ env.GO_VERSION }} | |
uses: actions/setup-go@v4 | |
with: | |
go-version: ${{ env.GO_VERSION }} | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
ref: ${{ github.event.pull_request.head.ref }} | |
repository: ${{ github.event.pull_request.head.repo.full_name }} | |
- name: Shorten SHA | |
id: vars | |
run: echo "::set-output name=pr_sha_short::$(git rev-parse --short ${{ github.event.pull_request.head.sha }} )" | |
- name: Set e2e Cluster Name | |
run: | | |
rand=${{ steps.vars.outputs.pr_sha_short }} | |
if [ "$rand" = "" ]; then | |
rand=$RANDOM | |
fi | |
echo "CLUSTER_NAME=aks-addon-vk-test${rand}" >> $GITHUB_ENV | |
- name: Install Azure CLI latest | |
run: | | |
curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash | |
az version | |
- uses: azure/[email protected] | |
with: | |
client-id: ${{ secrets.CLIENTID }} | |
tenant-id: ${{ secrets.TENANT_ID }} | |
subscription-id: ${{ secrets.SUBSCRIPTIONID }} | |
- name: Run e2e test | |
run: | | |
OUTPUT_TYPE=type=registry make aks-addon-e2e-test | |
env: | |
REGISTRY: ${{ env.REGISTRY}} | |
E2E_REGION: ${{ secrets.E2E_REGION}} | |
CLUSTER_NAME: ${{ env.CLUSTER_NAME }} | |
VERSION: ${{ env.E2E_IMG_TAG}} | |
E2E_TARGET: "pr" | |
PR_COMMIT_SHA: ${{ steps.vars.outputs.pr_sha_short }} | |
- name: Cleanup e2e resources | |
if: ${{ always() }} | |
run: | | |
set +e | |
az group delete --name "${{ env.CLUSTER_NAME }}" --yes --no-wait || true |