-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathazure-pipelines.yml
76 lines (68 loc) · 2.14 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
69
70
71
72
73
74
75
76
# Starter pipeline
# Start with a minimal pipeline that you can customize to build and deploy your code.
# Add steps that build, run tests, deploy, and more:
# https://aka.ms/yaml
trigger:
batch: true
branches:
include:
- main
resources:
repositories:
- repository: cnp-azuredevops-libraries
type: github
ref: refs/heads/master
name: hmcts/cnp-azuredevops-libraries
endpoint: "hmcts"
pool:
vmImage: "ubuntu-latest"
variables:
- name: timeoutInMinutes
value: "60"
- name: product
value: slack-help-bot
- template: vars/input-variables.yaml@cnp-azuredevops-libraries
parameters:
- name: action
displayName: Action
type: string
default: plan
values:
- plan
- apply
- name: environments
displayName: Environment to run
type: object
default:
- environment: "cftptl"
storageAccountName: "cftptlintsvc"
storageAccountRg: "core-infra-intsvc-rg"
dependsOn: "Precheck"
stages:
- stage: Precheck
jobs:
- job:
timeoutInMinutes: ${{ variables.timeoutInMinutes }}
steps:
- template: steps/terraform-precheck.yaml@cnp-azuredevops-libraries
parameters:
overrideAction: ${{ parameters.action }}
keyvaultName: "infra-vault-nonprod"
keyvaultSecret: "azure-devops-sp-token"
serviceConnection: "DCD-CFT-Sandbox"
- ${{ each parameter in parameters.environments }}:
- stage: ${{ parameter.environment }}
displayName: "${{ parameter.environment }}-intsvc"
dependsOn: ${{ parameter.dependsOn }}
jobs:
- job:
steps:
- template: steps/terraform.yaml@cnp-azuredevops-libraries
parameters:
overrideAction: ${{ parameters.action }}
environment: "ptl"
component: infrastructure
serviceConnection: "DTS-${{ upper(parameter.environment) }}-INTSVC"
terraformInitSubscription: 04d27a32-7a07-48b3-95b8-3c8691e1a263
tfVarsFile: NULL
product: ${{ variables.product }}