forked from sonic-net/sonic-linux-kernel
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
87 lines (73 loc) · 2.49 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
# C/C++ with GCC
# Build your C/C++ project with GCC using make.
# Add steps that publish test results, save build artifacts, deploy, and more:
# https://docs.microsoft.com/azure/devops/pipelines/apps/c-cpp/gcc
trigger:
branches:
include:
- "*"
pr:
- master
- 202012
- 201911
- 201811
name: $[ variables['branchName'] ]
# Using conditions to set the variable value.
# I guess if both conditions return true the last will be used.
variables:
${{ if startsWith(variables['Build.SourceBranch'], 'refs/heads/') }}:
branchName: $[ replace(variables['Build.SourceBranch'], 'refs/heads/', '') ]
${{ if startsWith(variables['Build.SourceBranch'], 'refs/pull/') }}:
branchName: $[ replace(variables['System.PullRequest.SourceBranch'], 'refs/heads/', '') ]
jobs:
- job:
condition: eq(variables['branchName'], 'master')
timeoutInMinutes: 240
pool: sonicbld
container:
image: sonicdev-microsoft.azurecr.io:443/sonic-slave-buster:latest
steps:
- script: |
git config --global user.email "[email protected]"
git config --global user.name "Guohan Lu"
export kernel_procure_method=build
cat /proc/cpuinfo
false && make
displayName: "Compile sonic kernel"
- publish: $(System.DefaultWorkingDirectory)/
artifact: sonic-linux-kernel
displayName: "Archive sonic kernel debian packages"
- job:
condition: in(variables['branchName'], '202012')
timeoutInMinutes: 240
pool: sonicbld
container:
image: sonicdev-microsoft.azurecr.io:443/sonic-slave-buster:latest
steps:
- script: |
git config --global user.email "[email protected]"
git config --global user.name "Guohan Lu"
export kernel_procure_method=build
cat /proc/cpuinfo
false && make
displayName: "Compile sonic kernel"
- publish: $(System.DefaultWorkingDirectory)/
artifact: sonic-linux-kernel.$(branchName)
displayName: "Archive sonic kernel debian packages"
- job:
condition: in(variables['branchName'], '201811', '201911')
timeoutInMinutes: 240
pool: sonicbld
container:
image: sonicdev-microsoft.azurecr.io:443/sonic-slave-stretch:latest
steps:
- script: |
git config --global user.email "[email protected]"
git config --global user.name "Guohan Lu"
export kernel_procure_method=build
cat /proc/cpuinfo
false && make
displayName: "Compile sonic kernel"
- publish: $(System.DefaultWorkingDirectory)/
artifact: sonic-linux-kernel.$(branchName)
displayName: "Archive sonic kernel debian packages"