-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdeploy-appservice.yml
94 lines (87 loc) · 2.84 KB
/
deploy-appservice.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
88
89
90
91
92
93
94
trigger: none
pr: none
pool: DEFRA-COMMON-ubuntu2004-SSV3
parameters:
- name: teamName
displayName: 'Select a dev environment to deploy to: (works only with "development" as target env)'
default: 'DEV1'
type: string
values:
- DEV1
- DEV2
- DEV3
- DEV5
- DEV6
- DEV7
- DEV8
- DEV9
- DEV10
- DEV11
- DEV12
- DEV13
- DEV14
- name: envToDeploy
displayName: 'Target Environment to deploy: (select "development" for dev 1-9)'
default: development
type: string
values:
- development
- tst
- preprod
- prod
- name: imageTag
displayName: Enter Tag for the Image (Docker tag) or Release name (Git repo tag)
default: ''
type: string
variables:
- ${{ if eq(parameters.envToDeploy, 'development') }}:
- name: env
value: DEV1
- template: vars/${{ parameters.teamName }}-${{ parameters.envToDeploy }}.yaml
- ${{ elseif eq(parameters.envToDeploy, 'tst') }}:
- name: env
value: TST1
- template: vars/${{ parameters.envToDeploy }}.yaml
- ${{ elseif eq(parameters.envToDeploy, 'preprod') }}:
- name: env
value: PRE1
- template: vars/${{ parameters.envToDeploy }}.yaml
- ${{ elseif eq(parameters.envToDeploy, 'prod') }}:
- name: env
value: PRD1
- template: vars/${{ parameters.envToDeploy }}.yaml
# Release tags reference
- template: pipelines/image-tags/${{ parameters.envToDeploy }}.yaml@ReleaseTags
- ${{ if eq(parameters.envToDeploy, 'development') }}:
- template: pipelines/image-tags/${{ parameters.teamName }}-${{ parameters.envToDeploy }}.yaml@ReleaseTags
resources:
repositories:
- repository: CommonTemplates
name: defra/epr-webapps-code-deploy-templates
type: github
endpoint: defra
ref: main
# The repo will be reference the repo by a release tag (if the imageTag parameter contains 'release') otherwise it will pull down the main branch.
- repository: ReleaseTags
name: RWD-CPR-EPR4P-ADO/epr-app-config-settings
type: git
ref: ${{ replace(replace(contains(parameters.imageTag, 'RELEASE'),'True',replace('refs/tags/RELEASETAG','RELEASETAG', parameters.imageTag)),'False','main') }}
- repository: AutomationTesting #this repo contain the automation testing script
name: RWD-CPR-EPR4P-ADO/epr-playwright-bdd
type: git
ref: main
extends:
template: epr-deployment-pipeline.yaml@CommonTemplates
parameters:
${{ if contains(parameters.imageTag, 'RELEASE') }}:
imageTag: $(DEVRWDWEBWAx401)
${{ else }}:
imageTag: ${{ parameters.imageTag }}
azureSubscription: $(azureSubscription)
acrName: $(acr.azureContainerRegistryName)
registryName: $(acr.repositoryName)
serviceName: $(serviceName)
${{ if eq(parameters.envToDeploy, 'development') }}:
targetEnvironment: 'development'
${{ else }}:
targetEnvironment: '$(env)'