Skip to content

Commit

Permalink
update testexamples, use docker container and 1es pool
Browse files Browse the repository at this point in the history
  • Loading branch information
lonegunmanb committed Dec 15, 2023
1 parent 8141d06 commit e3ebc17
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 56 deletions.
47 changes: 0 additions & 47 deletions .github/actions/e2e-testexamples/action.yml

This file was deleted.

18 changes: 9 additions & 9 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
outputs:
examples: ${{ steps.getexamples.outputs.examples }}
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 #v4.1.1
- uses: actions/checkout@v4
- name: get examples
id: getexamples
uses: Azure/terraform-azurerm-avm-template/.github/actions/e2e-getexamples@main
Expand All @@ -27,7 +27,7 @@ jobs:

testexamples:
if: github.event.repository.name != 'terraform-azurerm-avm-template'
runs-on: ubuntu-latest
runs-on: [ self-hosted, 1ES.Pool=terraform-azurerm-container-apps ]
needs: getexamples
environment: test
env:
Expand All @@ -40,14 +40,14 @@ jobs:
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 #v4.1.1

- uses: Azure/login@v1
with:
client-id: ${{ secrets.AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}

- name: Test example
uses: Azure/terraform-azurerm-avm-template/.github/actions/e2e-testexamples@main
shell: bash
run: |
set -e
az login --identity --username $MSI_ID > /dev/null
export ARM_SUBSCRIPTION_ID=$(az login --identity --username $MSI_ID | jq -r '.[0] | .id')
export ARM_TENANT_ID=$(az login --identity --username $MSI_ID | jq -r '.[0] | .tenantId')
docker run --rm -v /var/run/docker.sock:/var/run/docker.sock -v $(pwd):/src -w /src --network=host -e TF_IN_AUTOMATION -e TF_VAR_enable_telemetry -e AVM_MOD_PATH=/src -e AVM_EXAMPLE=${{ matrix.example }} -e MSI_ID -e ARM_SUBSCRIPTION_ID -e ARM_TENANT_ID -e ARM_USE_MSI=true mcr.microsoft.com/azterraform:latest make test-example
with:
example: ${{ matrix.example }}

Expand Down

0 comments on commit e3ebc17

Please sign in to comment.