-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
60 lines (51 loc) · 1.85 KB
/
azure-pipelines.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
# 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:
- main
variables:
- name: a
value: 2
- name: b
value: 3
pool:
vmImage: ubuntu-latest
stages:
- stage:
displayName: Sum for a and b
jobs:
- job:
displayName: Script
steps:
- script: |
Sum=$((${{ variables.a }} + ${{ variables.b }}))
echo "${{ variables.a }}">tema_faina_script.txt
echo "${{ variables.b }}">>tema_faina_script.txt
echo $Sum>>tema_faina_script.txt
displayName: 'Sum using script'
- publish: tema_faina_script.txt
displayName: Publish artifact
- job:
displayName: Bash
steps:
- bash: |
which bash
Sum=$((${{ variables.a }} + ${{ variables.b }}))
echo "${{ variables.a }}">tema_faina_bash.txt
echo "${{ variables.b }}">>tema_faina_bash.txt
echo $Sum>>tema_faina_bash.txt
displayName: 'Sum using bash'
- publish: tema_faina_bash.txt
displayName: Publish artifact for sum using bash
- job:
displayName: Powershell
steps:
- powershell: |
$Sum = $((${{ variables.a }} + ${{ variables.b }}))
$Sum>tema_faina_pawershell.txt
${{ variables.a }}>tema_faina_pawershell.txt
${{ variables.b }}>tema_faina_pawershell.txt
displayName: 'Sum using powershell'
- publish: tema_faina_pawershell.txt
displayName: Publish artifact for sum using pawershell