gha: tdx: Set KUBECONFIG env at the job level

By doing this we avoid having to set it up on every step.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
This commit is contained in:
Fabiano Fidêncio 2023-04-12 14:57:03 +02:00
parent d7fdf19e9b
commit 542bb0f3f3

View File

@ -20,6 +20,8 @@ jobs:
vmm: vmm:
- qemu-tdx - qemu-tdx
runs-on: tdx runs-on: tdx
env:
KUBECONFIG: /etc/rancher/k3s/k3s.yaml
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
with: with:
@ -35,8 +37,6 @@ jobs:
kubectl apply -f tools/packaging/kata-deploy/kata-deploy/base/kata-deploy.yaml kubectl apply -f tools/packaging/kata-deploy/kata-deploy/base/kata-deploy.yaml
kubectl -n kube-system wait --timeout=10m --for=condition=Ready -l name=kata-deploy pod kubectl -n kube-system wait --timeout=10m --for=condition=Ready -l name=kata-deploy pod
kubectl apply -f tools/packaging/kata-deploy/runtimeclasses/kata-runtimeClasses.yaml kubectl apply -f tools/packaging/kata-deploy/runtimeclasses/kata-runtimeClasses.yaml
env:
KUBECONFIG: /etc/rancher/k3s/k3s.yaml
- name: Run tests - name: Run tests
timeout-minutes: 30 timeout-minutes: 30
@ -47,7 +47,6 @@ jobs:
popd popd
env: env:
KATA_HYPERVISOR: ${{ matrix.vmm }} KATA_HYPERVISOR: ${{ matrix.vmm }}
KUBECONFIG: /etc/rancher/k3s/k3s.yaml
- name: Delete kata-deploy - name: Delete kata-deploy
if: always() if: always()
@ -64,5 +63,3 @@ jobs:
kubectl delete -f tools/packaging/kata-deploy/kata-cleanup/base/kata-cleanup.yaml kubectl delete -f tools/packaging/kata-deploy/kata-cleanup/base/kata-cleanup.yaml
kubectl delete -f tools/packaging/kata-deploy/kata-rbac/base/kata-rbac.yaml kubectl delete -f tools/packaging/kata-deploy/kata-rbac/base/kata-rbac.yaml
kubectl delete -f tools/packaging/kata-deploy/runtimeclasses/kata-runtimeClasses.yaml kubectl delete -f tools/packaging/kata-deploy/runtimeclasses/kata-runtimeClasses.yaml
env:
KUBECONFIG: /etc/rancher/k3s/k3s.yaml