forked from Azure-Samples/modern-data-warehouse-dataops
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathazdo-fabric-cd-release-with-approvals.yml
53 lines (49 loc) · 1.95 KB
/
azdo-fabric-cd-release-with-approvals.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
trigger:
- none
stages:
- stage: deploy_to_test
displayName: 'Deploy to Test'
variables:
- group: fabric-test
jobs:
- job: APPROVE_DEV_TO_TEST
pool: server
steps:
- task: ManualValidation@0
timeoutInMinutes: 3 # The time to wait for an approval. Otherwise the task will timeout and fail.
inputs:
notifyUsers: ''
instructions: 'Approve deployment from Dev to Test'
- job: DEPLOY_DEV_TO_TEST
pool:
vmImage: 'ubuntu-latest'
steps:
- task: PowerShell@2
displayName: 'Fabric CD DEV TO TEST'
inputs:
filePath: "$(System.DefaultWorkingDirectory)/devops/devops_scripts/run-deployment-pipelines.ps1"
arguments: '-baseUrl "$(fabricRestApiEndpoint)" -fabricToken $(token) -pipelineName "$(pipelineName)" -sourceStageName "$(sourceStageName)" -targetStageName "$(targetStageName)" -targetStageWsName "$(workspaceName)"'
pwsh: true
- stage: deploy_to_prod
displayName: 'Deploy to Production'
variables:
- group: fabric-prod
jobs:
- job: APPROVE_TEST_TO_PROD
pool: server
steps:
- task: ManualValidation@0
timeoutInMinutes: 1 # The time to wait for an approval. Otherwise the task will timeout and fail.
inputs:
notifyUsers: ''
instructions: 'Approve deployment from Test to Production'
- job: DEPLOY_TEST_TO_PROD
pool:
vmImage: 'ubuntu-latest'
steps:
- task: PowerShell@2
displayName: 'Fabric CD TEST TO PROD'
inputs:
filePath: "$(System.DefaultWorkingDirectory)/devops/devops_scripts/run-deployment-pipelines.ps1"
arguments: '-baseUrl "$(fabricRestApiEndpoint)" -fabricToken $(token) -pipelineName "$(pipelineName)" -sourceStageName "$(sourceStageName)" -targetStageName "$(targetStageName)" -targetStageWsName "$(workspaceName)"'
pwsh: true