-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathazure-pipelines.yml
68 lines (63 loc) · 1.43 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
name: 'helloworld'
schedules:
- cron: "0 12 * * 0"
displayName: Weekly Sunday build
branches:
include:
- releases/*
always: true
trigger:
batch: true
paths:
include:
- master/*
- k8s/helm/partsunlimited-api
variables:
- name: envName
value: 'smarthotel-qa'
- name: azureSub
value: 'RMPM'
stages:
- template: stages/deploy.yml # Template references stage
parameters:
stageName: 'dev'
jobName: 'deployDev'
pool:
vmImage: 'ubuntu-16.04'
env: 'fromGitHub'
- stage: QA
jobs:
- template: jobs/deploy.yml # Template references job
parameters:
name: 'DeployQA'
pool:
vmImage: 'ubuntu-16.04'
env: $(envName)
sub: $(azureSub)
- job:
pool:
vmImage: 'ubuntu-16.04'
steps:
- template: steps/deploy.yml # Template references step
- stage: Prod
jobs:
- job: A
pool:
vmImage: 'ubuntu-16.04'
steps:
- script: echo job A $(Build.Repository.Name)
- deployment:
displayName: 'deploy to Prod'
environment: 'fromGitHub-2'
dependsOn: A
continueOnError: true
condition: and(succeeded(), eq(variables['build.sourceBranch'], 'refs/heads/master'))
variables:
- template: variables/deploy.yml # Template references variables
pool:
vmImage: ${{ variables.vmImage }}
strategy:
runOnce:
deploy:
steps:
- script: echo ${{ variables.arch }} ${{ variables.config }}