-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathazure-pipelines.yml
50 lines (42 loc) · 1.33 KB
/
azure-pipelines.yml
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
# Starter pipeline
# Start with a minimal pipeline that you can customize to build and deploy your code.
# Add steps that build, run tests, deploy, and more:
# https://aka.ms/yaml
trigger:
branches:
include:
- main
pr:
branches:
include:
- branch/*
- main
pool:
vmImage: ubuntu-latest
steps:
- task: TerraformInstaller@0
inputs:
terraformVersion: '1.0.1'
- task: TerraformTaskV2@2
name: "TerraformInit"
inputs:
provider: 'azurerm'
command: 'init'
backendServiceArm: 'AH_CSA_SWARM_MA2 (6e905154-269f-4db5-b367-01288088e6f3)'
backendAzureRmResourceGroupName: 'AH_SharedServices'
backendAzureRmStorageAccountName: 'ahcsaterraform'
backendAzureRmContainerName: 'terraform'
backendAzureRmKey: 'multiplevms.tfstate'
workingDirectory: '$(System.DefaultWorkingDirectory)/Terraform/MultipleVMs'
- task: TerraformTaskV2@2
name: "TerraformValidate"
inputs:
provider: 'azurerm'
command: 'validate'
workingDirectory: '$(System.DefaultWorkingDirectory)/Terraform/MultipleVMs'
- task: PublishPipelineArtifact@1
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/main'))
inputs:
targetPath: '$(Pipeline.Workspace)'
artifact: 'Artifact'
publishLocation: 'pipeline'