-
Notifications
You must be signed in to change notification settings - Fork 0
/
test-conditions.yml
36 lines (33 loc) · 958 Bytes
/
test-conditions.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
stages:
- stage: conditions
displayName: Conditions
jobs:
- job: print
displayName: Print vars
pool:
vmImage: 'ubuntu-latest'
steps:
- bash: |
echo $(Build.Reason)
echo $(Build.TargetBranch)
- job: pr
displayName: PR
condition: eq(variables['Build.Reason'], 'PullRequest')
pool:
vmImage: 'ubuntu-latest'
steps:
- bash: echo $(Build.Reason)
- job: target_stable
displayName: target == stable
condition: eq(variables['System.PullRequest.TargetBranch'], 'stable')
pool:
vmImage: 'ubuntu-latest'
steps:
- bash: echo $(Build.TargetBranch)
- job: not_cron
displayName: not cron
condition: ne(variables['Build.Reason'], 'Scheduled')
pool:
vmImage: 'ubuntu-latest'
steps:
- bash: echo $(Build.Reason)