-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines-dev-qa.yml
81 lines (70 loc) · 2.16 KB
/
azure-pipelines-dev-qa.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
parameters:
- name: manualTriggerDEV
type: boolean
default: true
- name: manualTriggerQA
type: boolean
default: false
trigger:
- multiple-env
variables:
# Azure Resource Manager connection created during pipeline creation
azureSubscription: 'absServiceConnection'
# Web app name
webAppName: 'mzinbookstore-linux'
# Environment name
environmentName: 'mzinbookstore-linux'
# Package or folder path
packageFolderPath: '$(System.DefaultWorkingDirectory)/'
# Agent VM image name
vmImageName: 'ubuntu-latest'
manualTriggerDEV: ${{ parameters.manualTriggerDEV }}
manualTriggerQA: ${{ parameters.manualTriggerQA }}
stages:
- stage: Build
displayName: Build Web App Stage
jobs:
- job: Build
pool:
vmImage: $(vmImageName)
steps:
- script: echo Hello, world!
displayName: 'Run a one-line script'
- task: ArchiveFiles@2
inputs:
rootFolderOrFile: '$(System.DefaultWorkingDirectory)'
includeRootFolder: false
archiveType: 'zip'
archiveFile: '$(Build.ArtifactStagingDirectory)/$(Build.BuildId).zip'
replaceExistingArchive: true
- task: PublishBuildArtifacts@1
inputs:
pathtoPublish: '$(Build.ArtifactStagingDirectory)/$(Build.BuildId).zip'
artifactName: 'drop'
publishLocation: 'Container'
- stage: Dev
displayName: 'Dev stage'
condition: and(eq(variables.manualTriggerDEV, true), succeeded('Build'))
dependsOn: Build
jobs:
- template: deploy_and_test.yml
parameters:
environmentName: $(environmentName)
webAppName: $(webAppName)
azureSubscription: $(azureSubscription)
packageFolderPath: $(packageFolderPath)
url: "https://mzinbookstore-linux.azurewebsites.net"
browser: "chrome"
- stage: QA
displayName: 'QA stage'
condition: and(eq(variables.manualTriggerQA, true), succeeded('Build'))
dependsOn: Build
jobs:
- template: deploy_and_test.yml
parameters:
environmentName: "mzinbookstore-linux"
webAppName: $(webAppName)
azureSubscription: $(azureSubscription)
packageFolderPath: $(packageFolderPath)
url: "https://mzinbookstore-linux.azurewebsites.net"
browser: "chrome"