This repository was archived by the owner on Jul 28, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcd-infrastructure-dev-core.yaml
More file actions
61 lines (54 loc) · 1.78 KB
/
cd-infrastructure-dev-core.yaml
File metadata and controls
61 lines (54 loc) · 1.78 KB
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
---
name: $(Build.SourceBranchName)-$(Date:yyyyMMdd)_$(Rev:r)
trigger: none
pr: none
pool:
# vmImage: ubuntu-latest
name: private-pool-dev-uks
resources:
repositories:
- repository: dtos-devops-templates
type: github
name: NHSDigital/dtos-devops-templates
ref: cf5e22fe4614b7d077a22301d29883e86ac3defc
endpoint: NHSDigital
variables:
- group: DEV_core_backend
- group: DEV_audit_backend_remote_state
- group: DEV_hub_backend_remote_state
- name: TF_DIRECTORY
value: $(System.DefaultWorkingDirectory)/$(System.TeamProject)/infrastructure/tf-core
- name: TF_VERSION
value: 1.11.4
- name: TF_PLAN_ARTIFACT
value: tf_plan_core_DEV
- name: ENVIRONMENT
value: development
stages:
- stage: terraform_plan
displayName: Terraform Plan
condition: eq(variables['Build.Reason'], 'Manual')
variables:
tfVarsFile: environments/$(ENVIRONMENT).tfvars
jobs:
- job: init_and_plan
displayName: Init, plan, store artifact
steps:
- checkout: self
- checkout: dtos-devops-templates
- template: .azuredevops/templates/steps/tf_plan.yaml@dtos-devops-templates
- stage: terraform_apply
displayName: Terraform Apply
dependsOn: [terraform_plan]
condition: and(eq(dependencies.terraform_plan.outputs['init_and_plan.TerraformPlan.changesPresent'], 'true'), eq(variables['Build.Reason'], 'Manual'))
jobs:
- deployment: terraform_apply
displayName: Init, get plan artifact, apply
environment: $(ENVIRONMENT)
strategy:
runOnce:
deploy:
steps:
- checkout: self
- checkout: dtos-devops-templates
- template: .azuredevops/templates/steps/tf_apply.yaml@dtos-devops-templates