Skip to content

Commit 77487a6

Browse files
committed
Updated variables and pipeline with PROD setup
1 parent 29ecd00 commit 77487a6

3 files changed

Lines changed: 131 additions & 2 deletions

File tree

‎cicd/cicd-pipeline.yml‎

Lines changed: 89 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
name: DataFactory-CICD-Pipeline-$(Date:yyyyMMdd)$(Rev:.r)
22

3+
# ADF is the shortened version of Azure Data Factory
4+
35
trigger: none
46

57
pool:
@@ -23,6 +25,7 @@ stages:
2325
ADFArtifactName: "${{ variables.ADFArtifactName }}"
2426
WorkingDirectory: "${{ variables.WorkingDirectory }}"
2527

28+
# DEPLOY TO UAT
2629
- stage: DeployToUAT
2730
dependsOn: BuildDEVDataFactory
2831
condition: succeeded()
@@ -56,7 +59,58 @@ stages:
5659
KeyVaultURL: "${{ variables.KeyVaultURL }}"
5760
KeyVaultBicepTemplateFilePath: "${{ variables.KeyVaultBicepTemplateFilePath }}"
5861

59-
- job: DeployADF
62+
- job: DeployDataFactory
63+
displayName: "Deploy ADF ARM Template To Target ADF"
64+
dependsOn: DeployAzureResources
65+
condition: succeeded()
66+
steps:
67+
- template: adf-cicd/adf-deploy.yml
68+
parameters:
69+
AzureResourceManagerConnection: "${{ variables.AzureResourceManagerConnection }}"
70+
DataFactoryName: "${{ variables.DataFactoryName }}"
71+
DataFactoryTemplateParametersFilePath: "${{ variables.DataFactoryTemplateParametersFilePath }}"
72+
ResourceGroupName: "${{ variables.ADFResourceGroupName }}"
73+
ResourceGroupLocation: "${{ variables.ResourceGroupLocation }}"
74+
ADFArtifactName: "${{ variables.ADFArtifactName }}"
75+
Environment: "${{ variables.Environment }}"
76+
77+
# DEPLOY TO PROD
78+
- stage: DeployToPROD
79+
dependsOn:
80+
- BuildDEVDataFactory
81+
- DeployToUAT
82+
condition: succeeded()
83+
displayName: "Deploy To PROD"
84+
85+
variables:
86+
- template: variables/prod-variables.yml
87+
88+
jobs:
89+
- deployment: ApprovalCheckDeployToPROD
90+
displayName: "Approval Check To Deploy To PROD"
91+
environment: PROD
92+
strategy:
93+
runOnce:
94+
deploy:
95+
steps:
96+
- powershell: |
97+
Write-Host "Deploy To PROD has been fully approved. Starting the deployment to PROD."
98+
99+
- job: DeployAzureResources
100+
displayName: "Deploy Azure Resources Via Bicep"
101+
steps:
102+
- template: azure-resources/deploy-azure-resources.yml
103+
parameters:
104+
AzureResourceManagerConnection: "${{ variables.AzureResourceManagerConnection }}"
105+
DataFactoryName: "${{ variables.DataFactoryName }}"
106+
ADFResourceGroupName: "${{ variables.ADFResourceGroupName }}"
107+
ADFBicepTemplateFilePath: "${{ variables.ADFBicepTemplateFilePath }}"
108+
KeyVaultName: "${{ variables.KeyVaultName }}"
109+
KeyVaultResourceGroupName: "${{ variables.KeyVaultResourceGroupName }}"
110+
KeyVaultURL: "${{ variables.KeyVaultURL }}"
111+
KeyVaultBicepTemplateFilePath: "${{ variables.KeyVaultBicepTemplateFilePath }}"
112+
113+
- job: DeployDataFactory
60114
displayName: "Deploy ADF ARM Template To Target ADF"
61115
dependsOn: DeployAzureResources
62116
condition: succeeded()
@@ -72,6 +126,40 @@ stages:
72126
Environment: "${{ variables.Environment }}"
73127

74128

129+
130+
131+
132+
133+
134+
135+
136+
137+
138+
139+
140+
141+
142+
143+
144+
145+
146+
147+
148+
149+
150+
151+
152+
153+
154+
155+
156+
157+
158+
159+
160+
161+
162+
75163
# - stage: DeployToPROD
76164
# displayName: "Deploy To PROD"
77165

‎cicd/variables/prod-variables.yml‎

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# PROD Pipeline Variables
2+
3+
variables:
4+
- name: AzureResourceManagerConnection # Service Principal that has the Contributor RBAC (role based access control) permission to deploy the Data Factory ARM template to the UAT resource group rg-adf-cicd-uat
5+
value: DataFactoryCICDAzureResourceManager
6+
7+
# Data Factory (ADF)
8+
- name: DataFactoryName
9+
value: adf-njl-prod
10+
11+
- name: DataFactoryTemplateParametersFilePath
12+
value: "$(Build.Repository.LocalPath)/cicd/adf-cicd/adf-prod-template-parameters.json"
13+
14+
- name: ADFBicepTemplateFilePath
15+
value: "$(Build.Repository.LocalPath)/cicd/azure-resources/adf.bicep"
16+
17+
- name: ADFResourceGroupName
18+
value: rg-adf-cicd-prod
19+
20+
- name: ADFArtifactName # Data Factory artifact name created during the adf-build.yml job template
21+
value: ADFArtifact
22+
23+
# Key Vault
24+
- name: KeyVaultName
25+
value: kv-njl-adf-cicd-prod
26+
27+
- name: KeyVaultResourceGroupName
28+
value: rg-adf-cicd-prod
29+
30+
- name: KeyVaultURL
31+
value: https://kv-njl-adf-cicd-prod.vault.azure.net/
32+
33+
- name: KeyVaultBicepTemplateFilePath
34+
value: "$(Build.Repository.LocalPath)/cicd/azure-resources/keyvault.bicep"
35+
36+
# Shared
37+
- name: ResourceGroupLocation
38+
value: "East US"
39+
40+
- name: Environment
41+
value: PROD

‎cicd/variables/uat-variables.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ variables:
44
- name: AzureResourceManagerConnection # Service Principal that has the Contributor RBAC (role based access control) permission to deploy the Data Factory ARM template to the UAT resource group rg-adf-cicd-uat
55
value: DataFactoryCICDAzureResourceManager
66

7-
# Data Factory
7+
# Data Factory (ADF)
88
- name: DataFactoryName
99
value: adf-njl-uat
1010

0 commit comments

Comments
 (0)