-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml.pwa.tmpl
135 lines (122 loc) · 4.35 KB
/
azure-pipelines.yml.pwa.tmpl
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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
# This is just one example of how the job template can be utilized.
# Project-specific modifications can be made as needed, providing flexibility and adaptability.
# Define the conditions that trigger the pipeline.
# This pipeline is triggered on changes to the specified branches and tags.
# See https://docs.microsoft.com/en-us/azure/devops/pipelines/repos/azure-repos-git?view=azure-devops&tabs=yaml#ci-triggers
trigger: none
name: $(Date:yyyyMMdd)$(Rev:.r)
appendCommitMessageToRunName: false
resources:
pipelines:
- pipeline: <pwa-ci-pipeline-name>
source: <pwa-ci-pipeline-name>
trigger:
branches:
include:
# Trigger by branch pipeline
- master
- develop
- release/*
# Trigger by tag pipeline
- refs/tags/version/*
repositories:
- repository: environments
type: git
name: environments
ref: master
- repository: cd-partner-devops
type: github
endpoint: INTERSHOP_GITHUB
name: intershop/cd-partner-devops
ref: refs/heads/stable/v1
variables:
# Library pwa-build-configuration is provided by Intershops DevOps Environment. It provides
# the following variables:
# - BUILD_AGENT_POOL: name of the build agent pool
# - REPO_SERVICE_CONNECTION: service connection to the customer ACR
# - REPO_PATH: host name and path of the customer ACR
- group: pwa-build-configuration
#
# The CD process can be very individual.
# The template has numerous parameters to configure the behavior separately for each environment.
#
stages:
- stage: CD_int
jobs:
- template: cd-job-template.yml@cd-partner-devops
parameters:
agentPool: $(BUILD_AGENT_POOL)
env: int_edit
product: pwa
environmentPath: environments
triggerPipelineName: <pwa-ci-pipeline-name>
versionFilePath: int/pwa/version-edit.yaml
prAutoComplete: true
useDeploymentJob: true
- template: cd-job-template.yml@cd-partner-devops
parameters:
agentPool: $(BUILD_AGENT_POOL)
env: int_live
product: pwa
environmentPath: environments
triggerPipelineName: <pwa-ci-pipeline-name>
versionFilePath: int/pwa/version-live.yaml
prAutoComplete: true
useDeploymentJob: true
dependsOn: "CD_pwa_int_edit"
- stage: CD_uat
dependsOn:
- CD_int
condition: and(succeeded(), startsWith(variables['resources.pipeline.<pwa-ci-pipeline-name>.sourceBranch'], 'refs/tags/version/'))
jobs:
- template: cd-job-template.yml@cd-partner-devops
parameters:
agentPool: $(BUILD_AGENT_POOL)
env: uat_edit
product: pwa
environmentPath: environments
triggerPipelineName: <pwa-ci-pipeline-name>
versionFilePath: uat/pwa/version-edit.yaml
prAutoComplete: true
useDeploymentJob: true
- template: cd-job-template.yml@cd-partner-devops
parameters:
agentPool: $(BUILD_AGENT_POOL)
env: uat_live
product: pwa
environmentPath: environments
triggerPipelineName: <pwa-ci-pipeline-name>
versionFilePath: uat/pwa/version-live.yaml
prAutoComplete: true
useDeploymentJob: true
dependsOn: "CD_pwa_uat_edit"
- stage: CD_prd
dependsOn:
- CD_uat
condition: and(succeeded(), startsWith(variables['resources.pipeline.<pwa-ci-pipeline-name>.sourceBranch'], 'refs/tags/version/'))
jobs:
- template: cd-job-template.yml@cd-partner-devops
parameters:
agentPool: $(BUILD_AGENT_POOL)
env: prd_edit
product: pwa
environmentPath: environments
triggerPipelineName: <pwa-ci-pipeline-name>
versionFilePath: prd/pwa/version-edit.yaml
prAutoComplete: true
useDeploymentJob: true
manualValidationEnabledForPrd: false
imageTagPattern: '^[0-9]+\.[0-9]+\.[0-9]+$'
- template: cd-job-template.yml@cd-partner-devops
parameters:
agentPool: $(BUILD_AGENT_POOL)
env: prd_live
product: pwa
environmentPath: environments
triggerPipelineName: <pwa-ci-pipeline-name>
versionFilePath: prd/pwa/version-live.yaml
prAutoComplete: true
manualValidationEnabledForPrd: false
useDeploymentJob: true
dependsOn: "CD_pwa_prd_edit"
imageTagPattern: '^[0-9]+\.[0-9]+\.[0-9]+$'