-
Notifications
You must be signed in to change notification settings - Fork 0
/
azp-main.yml
60 lines (49 loc) · 1.8 KB
/
azp-main.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
name: Mono repo
trigger:
branches:
include:
- main
pr:
branches:
include:
- main
stages:
- stage: CheckoutStage
displayName: 'Checkout and analysis'
jobs:
- job: CheckoutJob
pool:
vmImage: ubuntu-latest
steps:
- checkout: self
- script: echo Checkout
- bash: |
echo '##vso[task.setvariable variable=UserSyncChanged;isOutput=true;]True'
echo '##vso[task.setvariable variable=AnalyticsSpaChanged;isOutput=true;]True'
displayName: Set changed Files
name: find_changed_areas
- bash: |
echo find_changed_areas.UserSyncChanged:
echo $(find_changed_areas.UserSyncChanged)
- bash: |
echo find_changed_areas.AnalyticsSpaChanged:
echo $(find_changed_areas.AnalyticsSpaChanged)
- pwsh: |
mkdir $(Build.ArtifactStagingDirectory)/changed_areas
echo "# Env file for passing data" > $(Build.ArtifactStagingDirectory)/changed_areas/changes.env
echo "##vso[task.setvariable variable=UserSyncChanged;]$(find_changed_areas.UserSyncChanged)" | Out-File -FilePath $(Build.ArtifactStagingDirectory)/changed_areas/changes.env -Append
echo "##vso[task.setvariable variable=AnalyticsSpaChanged;]$(find_changed_areas.AnalyticsSpaChanged)" | Out-File -FilePath $(Build.ArtifactStagingDirectory)/changed_areas/changes.env -Append
- task: PublishBuildArtifacts@1
inputs:
pathToPublish: '$(Build.ArtifactStagingDirectory)/changed_areas'
artifactName: changed_areas
- stage: UserSync_DeployStage
dependsOn: CheckoutStage
displayName: 'Sync: Stage deploy'
jobs:
- job: 'Deploy'
condition: eq(stageDependencies.CheckoutStage.CheckoutJob.outputs['find_changed_areas.UserSyncChanged'], true)
pool:
vmImage: ubuntu-latest
steps:
- script: echo Deployed