mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-09-20 16:27:52 +00:00
Merge pull request #7011 from jepio/fix-aks-cluster-name
gha: aks: Use short SHA in cluster name
This commit is contained in:
11
.github/workflows/run-k8s-tests-on-aks.yaml
vendored
11
.github/workflows/run-k8s-tests-on-aks.yaml
vendored
@@ -46,11 +46,16 @@ jobs:
|
|||||||
-p "${{ secrets.AZ_PASSWORD }}" \
|
-p "${{ secrets.AZ_PASSWORD }}" \
|
||||||
--tenant "${{ secrets.AZ_TENANT_ID }}"
|
--tenant "${{ secrets.AZ_TENANT_ID }}"
|
||||||
|
|
||||||
|
- name: Format cluster name
|
||||||
|
run: |
|
||||||
|
rev=$(git rev-parse --short=12 HEAD)
|
||||||
|
echo "cluster_name=${{ github.event.pull_request.number }}-$rev-${{ matrix.vmm }}-${{ matrix.host_os }}-amd64" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Create AKS cluster
|
- name: Create AKS cluster
|
||||||
run: |
|
run: |
|
||||||
az aks create \
|
az aks create \
|
||||||
-g "kataCI" \
|
-g "kataCI" \
|
||||||
-n "${{ github.event.pull_request.number }}-${{ github.event.pull_request.head.sha }}-${{ matrix.vmm }}-${{ matrix.host_os }}-amd64" \
|
-n "${{ env.cluster_name }}" \
|
||||||
-s "Standard_D4s_v5" \
|
-s "Standard_D4s_v5" \
|
||||||
--node-count 1 \
|
--node-count 1 \
|
||||||
--generate-ssh-keys \
|
--generate-ssh-keys \
|
||||||
@@ -67,7 +72,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Download credentials for the Kubernetes CLI to use them
|
- name: Download credentials for the Kubernetes CLI to use them
|
||||||
run: |
|
run: |
|
||||||
az aks get-credentials -g "kataCI" -n ${{ github.event.pull_request.number }}-${{ github.event.pull_request.head.sha }}-${{ matrix.vmm }}-${{ matrix.host_os }}-amd64
|
az aks get-credentials -g "kataCI" -n "${{ env.cluster_name }}"
|
||||||
|
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
timeout-minutes: 60
|
timeout-minutes: 60
|
||||||
@@ -99,6 +104,6 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
az aks delete \
|
az aks delete \
|
||||||
-g "kataCI" \
|
-g "kataCI" \
|
||||||
-n "${{ github.event.pull_request.number }}-${{ github.event.pull_request.head.sha }}-${{ matrix.vmm }}-${{ matrix.host_os }}-amd64" \
|
-n "${{ env.cluster_name }}" \
|
||||||
--yes \
|
--yes \
|
||||||
--no-wait
|
--no-wait
|
||||||
|
Reference in New Issue
Block a user