-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yaml
99 lines (89 loc) · 2.43 KB
/
azure-pipelines.yaml
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
88
89
90
91
92
93
94
95
96
97
98
99
trigger:
batch: true
branches:
include:
- testen
- az-acceptance
- main
- production-release-v*
pr:
autoCancel: true
branches:
include:
- main
resources:
repositories:
- repository: MamsInfra
type: git
name: MijnAmsterdam/mijn-amsterdam-infra
ref: refs/heads/main
parameters:
- name: pipelineAction
type: string
default: btd
values:
- btd
- updateAppSettings
- name: dtapName
type: string
default: t
values:
- t
- a
- name: btdBuild
type: boolean
default: true
- name: btdTest
type: boolean
default: true
- name: btdDeploy
type: boolean
default: true
variables:
- name: btdBuild
value: ${{ parameters.btdBuild }}
- name: btdTest
value: ${{ parameters.btdTest }}
- name: btdDeploy
value: ${{ parameters.btdDeploy }}
- name: dtapName
value: ${{ parameters.dtapName }}
- ${{ if or(eq(variables['Build.SourceBranchName'], 'testen'), eq(variables['Build.Reason'], 'PullRequest')) }}:
- name: dtapName
value: t
- ${{ if or(eq(variables['Build.SourceBranchName'], 'az-acceptance'), eq(variables['Build.SourceBranchName'], 'main')) }}:
- name: dtapName
value: a
- ${{ if eq(variables['Build.Reason'], 'PullRequest') }}:
- name: btdDeploy
value: false
- ${{ if ne(variables['Build.Reason'], 'PullRequest') }}:
- name: btdDeploy
value: ${{ parameters.btdDeploy }}
- ${{ if and(contains(variables['Build.SourceBranchName'], 'production-release'), eq(parameters.pipelineAction, 'btd')) }}:
- name: btdBuild
value: true
- name: btdTest
value: true
- name: btdDeploy
value: true
- ${{ if eq(parameters.pipelineAction, 'updateAppSettings') }}:
- name: btdBuild
value: false
- name: btdTest
value: false
- name: btdDeploy
value: false
- ${{ if contains(variables['Build.SourceBranchName'], 'production-release') }}:
- name: dtapName
value: p
jobs:
- template: pipelines/jobs/apps/btd-koppel-api.yaml@MamsInfra
parameters:
appServiceShortName: wmo
dtapName: ${{ variables.dtapName }}
btdBuild: ${{ variables.btdBuild }}
btdTest: ${{ variables.btdTest }}
btdDeploy: ${{ variables.btdDeploy }}
pipelineAction: ${{ parameters.pipelineAction }}
aquaScan: ${{ eq(variables['Build.Reason'], 'PullRequest') }}