-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathazure-pipeline-task-after-pulumi.yml
49 lines (45 loc) · 1.35 KB
/
azure-pipeline-task-after-pulumi.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
# An azure pipeline that builds a pulumi stack based on the branch name.
#
stages:
- stage: build_infrastructure
jobs:
- job: build_infrastructure
pool:
# vmImage: 'ubuntu-latest'
vmImage: 'windows-latest'
steps:
- task: Npm@1
inputs:
command: install
workingDir: './'
- task: CmdLine@2
inputs:
script: echo "Hello pre Pulumi task " `date`
- task: Pulumi@1
inputs:
azureSubscription: '$(ServiceConnectName)'
command: 'up'
args: '--yes --skip-preview'
cwd: './'
stack: '$(Build.SourceBranchName)'
createStack: true
- task: CmdLine@2
inputs:
script: echo "Hello post Pulumi task " `date`
- stage: destroy_infrastructure
jobs:
- job: destroy_infrastructure
pool:
vmImage: 'ubuntu-latest'
steps:
- task: Npm@1
inputs:
command: install
workingDir: './'
- task: Pulumi@1
inputs:
azureSubscription: '$(ServiceConnectName)'
command: 'destroy'
args: '--yes --skip-preview'
cwd: './'
stack: '$(Build.SourceBranchName)'