-
Notifications
You must be signed in to change notification settings - Fork 1
57 lines (55 loc) · 2.61 KB
/
test-runner.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
name: Runner Tests
on:
workflow_dispatch:
push:
paths:
- '.github/workflows/test-runner.yaml'
jobs:
provision-win2022_wp-terraform0:
runs-on: ubuntu-latest
container:
image: hashicorp/terraform:0.11.15
env:
TF_VAR_ARM_CLIENT_ID: 59897406-8d0d-42c9-9fb5-9c9fa14c4e53
TF_VAR_ARM_CLIENT_SECRET: ${{ secrets.ARM_CLIENT_SECRET }}
TF_VAR_ARM_SUBSCRIPTION_ID: 86fab581-914f-4c91-be92-9a5d70691d54
TF_VAR_ARM_TENANT_ID: 85173d93-99ef-4dff-9b45-495719659133
TF_VAR_MS_365_VMS_LOCATION: westeurope
TF_VAR_MS_365_VMS_IMAGE_RG_NAME: CommonRGWestEurope
TF_VAR_MS_365_VMS_VM_NAME_SPEC: swaz%s
TF_VAR_MS_365_VMS_WIN2022_WP_IMAGE_ID: /subscriptions/86fab581-914f-4c91-be92-9a5d70691d54/resourceGroups/CommonRGWestEurope/providers/Microsoft.Compute/images/ms-365-vms-win2022-wp-westeurope-000000
TF_VAR_MS_365_VMS_WIN2022_WP_VM_SIZE: Standard_B2s
TF_VAR_MS_365_VMS_DOMAIN_NAME: c0nt0s00.local
TF_VAR_MS_365_VMS_VM_ADMIN_PASSWORD: ${{ secrets.MS_365_VMS_VM_ADMIN_PASSWORD }}
TF_VAR_MS_365_VMS_PIPELINE_PROVIDER: Github
TF_VAR_MS_365_VMS_PIPELINE_URL: https://github.com/shurick81/ms-365-vms
TF_VAR_MS_365_VMS_PIPELINE_TOKEN: ${{ secrets.MS_365_VMS_PIPELINE_TOKEN }}
TF_VAR_MS_365_VMS_STACK_INSTANCE_ID: ms-365-vms-win2022_wp-terraform0-test-00
TF_VAR_MS_365_VMS_PIPELINE_STACK_LABEL: ms-365-vms-win2022_wp-terraform0-test-00
steps:
- uses: actions/checkout@v3
- run: cd infrastructure/stacks/azure/win2022_wp-terraform0; terraform init
- run: cd infrastructure/stacks/azure/win2022_wp-terraform0; terraform workspace new $TF_VAR_MS_365_VMS_STACK_INSTANCE_ID
- run: cd infrastructure/stacks/azure/win2022_wp-terraform0; terraform apply -auto-approve
test-win2022_wp-terraform0:
runs-on:
- self-hosted
- 'ms-365-vms-win2022_wp-terraform0-test-00'
- 'wp00'
needs: provision-win2022_wp-terraform0
steps:
- run: Write-Host $env:COMPUTERNAME
clean-win2022_wp-terraform0:
if: ${{ always() }}
needs: test-win2022_wp-terraform0
runs-on: ubuntu-latest
container:
image: mcr.microsoft.com/azure-cli:2.48.1
env:
ARM_CLIENT_ID: 59897406-8d0d-42c9-9fb5-9c9fa14c4e53
ARM_CLIENT_SECRET: ${{ secrets.ARM_CLIENT_SECRET }}
ARM_SUBSCRIPTION_ID: 86fab581-914f-4c91-be92-9a5d70691d54
ARM_TENANT_ID: 85173d93-99ef-4dff-9b45-495719659133
steps:
- run: az login --service-principal -u $ARM_CLIENT_ID -p $ARM_CLIENT_SECRET --tenant $ARM_TENANT_ID;
- run: az group delete --subscription $ARM_SUBSCRIPTION_ID -n ms-365-vms-win2022_wp-terraform0-test-00 -y