diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 9cd4a05496..332947afd1 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -18,6 +18,11 @@ on: self-hosted: description: "Self Hosted" type: boolean + run-without-nix: + description: "Run the E2E test without using a nix shell" + type: boolean + required: false + default: false env: container_registry: ghcr.io/edgelesssys @@ -73,11 +78,22 @@ jobs: - name: E2E Test run: | nix run .#scripts.get-logs workspace/e2e.namespace & - nix shell -L .#contrast.e2e --command ${{ inputs.test-name }}.test -test.v \ - --image-replacements workspace/just.containerlookup \ - --namespace-file workspace/e2e.namespace \ - --platform ${{ inputs.platform }} \ - --skip-undeploy="${{ inputs.skip-undeploy && 'true' || 'false' }}" + if [[ "${{inputs.run-without-nix}}" == "false" ]]; then + echo "Running with nix" + nix shell -L .#contrast.e2e --command ${{ inputs.test-name }}.test -test.v \ + --image-replacements workspace/just.containerlookup \ + --namespace-file workspace/e2e.namespace \ + --platform ${{ inputs.platform }} \ + --skip-undeploy="${{ inputs.skip-undeploy && 'true' || 'false' }}" + else + echo "Running without nix" + nix build .#contrast.e2e + ./result/bin/${{ inputs.test-name }}.test -test.v \ + --image-replacements workspace/just.containerlookup \ + --namespace-file workspace/e2e.namespace \ + --platform ${{ inputs.platform }} \ + --skip-undeploy="${{ inputs.skip-undeploy && 'true' || 'false' }}" + fi - name: Upload logs if: always() uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 diff --git a/.github/workflows/e2e_aks_runtime.yml b/.github/workflows/e2e_aks_runtime.yml index b598d5e2c4..b82e958858 100644 --- a/.github/workflows/e2e_aks_runtime.yml +++ b/.github/workflows/e2e_aks_runtime.yml @@ -9,15 +9,37 @@ on: jobs: test_matrix: - name: Test aks runtime - uses: ./.github/workflows/e2e.yml - with: - skip-undeploy: false - test-name: aks-runtime - platform: AKS-CLH-SNP - runner: ubuntu-22.04 - self-hosted: false - secrets: inherit - permissions: - contents: read - packages: write + steps: + - name: Install `az` with extensions + run: | + sudo apt-get update + sudo apt-get install apt-transport-https ca-certificates curl gnupg lsb-release + sudo mkdir -p /etc/apt/keyrings + curl -sLS https://packages.microsoft.com/keys/microsoft.asc | + gpg --dearmor | sudo tee /etc/apt/keyrings/microsoft.gpg > /dev/null + sudo chmod go+r /etc/apt/keyrings/microsoft.gpg + AZ_DIST=$(lsb_release -cs) + echo "Types: deb + URIs: https://packages.microsoft.com/repos/azure-cli/ + Suites: ${AZ_DIST} + Components: main + Architectures: $(dpkg --print-architecture) + Signed-by: /etc/apt/keyrings/microsoft.gpg" | sudo tee /etc/apt/sources.list.d/azure-cli.sources + sudo apt-get update + sudo apt-get install azure-cli + + az extension add --name aks-preview + az extension add --name confcom + - name: Test aks runtime + uses: ./.github/workflows/e2e.yml + with: + skip-undeploy: false + test-name: aks-runtime + platform: AKS-CLH-SNP + runner: ubuntu-22.04 + self-hosted: false + run-without-nix: true + secrets: inherit + permissions: + contents: read + packages: write