-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathazure-pipelines.yml
87 lines (72 loc) · 2.02 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
trigger:
- master
stages:
- stage: 'Build'
displayName: 'Build and package the solution'
jobs:
- job: Frontend
pool:
vmImage: 'ubuntu-latest'
variables:
workingDirectory : '.'
steps:
- task: Npm@1
displayName: 'npm install'
inputs:
command: 'install'
workingDir: '$(workingDirectory)'
- task: Npm@1
displayName: 'npm build'
inputs:
command: 'custom'
workingDir: '$(workingDirectory)'
customCommand: 'run build'
- publish: $(workingDirectory)/build
artifact: frontend
- stage: 'UAT'
displayName: 'Deployment to UAT'
variables:
- group: 'react-buildonce-deploymany.UAT'
- name: variable2
value: 'Variable 2'
jobs:
- job: Frontend
pool:
vmImage: 'vs2017-win2016'
steps:
- download: current
artifact: frontend
- template: templates/replacetags-steps.yml
- task: AzureRmWebAppDeployment@4
displayName: 'Azure App Service Deploy - frontend'
inputs:
azureSubscription: 'Azure React Build Once Deploy Many'
WebAppName: '$(Azure.WebAppName)'
packageForLinux: '$(Pipeline.Workspace)/frontend'
enableCustomDeployment: true
deployToSlotOrASE: true
ResourceGroupName: '$(Azure.ResourceGroupName)'
SlotName: 'uat'
- stage: 'Production'
displayName: 'Deployment to Production'
variables:
- group: 'react-buildonce-deploymany.PROD'
- name: variable1
value: 'Production variable 1'
- name: variable2
value: 'Production variable 2'
jobs:
- job: Frontend
pool:
vmImage: 'vs2017-win2016'
steps:
- download: current
artifact: frontend
- template: templates/replacetags-steps.yml
- task: AzureRmWebAppDeployment@4
displayName: 'Azure App Service Deploy - frontend'
inputs:
azureSubscription: 'Azure React Build Once Deploy Many'
WebAppName: '$(Azure.WebAppName)'
packageForLinux: '$(Pipeline.Workspace)/frontend'
enableCustomDeployment: true