forked from microsoftgraph/msgraph-typescript-typings
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathazure-pipelines-1.yml
More file actions
58 lines (47 loc) · 1.64 KB
/
azure-pipelines-1.yml
File metadata and controls
58 lines (47 loc) · 1.64 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
# Starter pipeline
# Start with a minimal pipeline that you can customize to build and deploy your code.
# Add steps that build, run tests, deploy, and more:
# https://aka.ms/yaml
trigger:
- master
pool:
vmImage: 'ubuntu-latest'
variables:
versionNum2: $(testVar)
${{ if ne(variables['versionNum2'], '') }}:
versionNum1: $(testVar)
${{ if eq(variables['versionNum2'], '') }}:
versionNum1: ''
steps:
- script: echo Hello, world!
displayName: 'Run a one-line script'
- script: |
echo '##vso[task.setvariable variable=versionNum1]$(versionNum2)'
echo '##vso[task.setvariable variable=NEWNUM]$(versionNum2)'
displayName: "use a conditional script to use "
condition: ne(variables.testVar, '')
- script: |
echo ver 2 ${{variables.versionNum2}}
echo ver 1 ${{variables.versionNum1}}
echo newnum 1 $(NEWNUM)
displayName: 'Run condition v1 eq'
- script: |
echo ver 2 ${{variables.versionNum2}}
echo ver 1 ${{variables.versionNum1}}
echo newnum 1 $(NEWNUM)
displayName: 'Run condition v2 eq'
condition: eq(variables.versionNum2, '')
- script: |
echo ver 2 ${{variables.versionNum2}}
echo ver 1 ${{variables.versionNum1}}
displayName: 'Run condition v2 ne'
condition: ne(variables['versionNum2'], '')
# - script: |
# echo ${{ if ne(variables.versionNum2, '') }}
# displayName: 'Run condition v2 eq with if'
# condition: ${{ if ne(variables.versionNum2, '') }}
# - script: |
# echo ${{ if ne(variables.versionNum2, '') }}
# echo ver 1 ${{variables.versionNum1}}
# displayName: 'Run condition v2 ne with if'
# condition: ${{ if ne(variables.versionNum2, '') }}