forked from sonic-net/sonic-mgmt
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathazure-pipelines.yml
More file actions
98 lines (84 loc) · 2.58 KB
/
azure-pipelines.yml
File metadata and controls
98 lines (84 loc) · 2.58 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
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
88
89
90
91
92
93
94
95
96
97
98
# 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
# For every job:
# continueOnError: false means it's a required test job and will block merge if it fails
# continueOnError: true means it's an optional test job and will not block merge even though it fails(unless a required test job depends on its result)
# For PR test job:
# If the current branch is not master, please reference the remote template by appending @sonic-mgmt.
# For example, "- template: .azure-pipelines/run-test-elastictest-template.yml@sonic-mgmt"
pr:
branches:
include:
- master
- 202???
paths:
exclude:
- .github
- docs
- LICENSE
- README.md
- SECURITY.md
- sdn_tests/**
- '**/*.md'
trigger: none
name: $(TeamProject)_$(Build.DefinitionName)_$(SourceBranchName)_$(Date:yyyyMMdd)$(Rev:.r)
resources:
repositories:
- repository: sonic-mgmt
type: github
name: sonic-net/sonic-mgmt
ref: master
endpoint: sonic-net
stages:
- template: /.azure-pipelines/common2/stages/analyze-code.yml
- stage: Pre_test
condition: succeededOrFailed()
jobs:
- job: static_analysis
displayName: "Static Analysis"
timeoutInMinutes: 10
continueOnError: false
pool: sonic-ubuntu-1c
steps:
- template: .azure-pipelines/pre-commit-check.yml
- job: validate_test_cases
displayName: "Validate Test Cases"
timeoutInMinutes: 30
continueOnError: false
pool: sonic-ubuntu-1c
steps:
- template: .azure-pipelines/pytest-collect-only.yml
parameters:
MGMT_BRANCH: ""
- job: dependency_check
displayName: "Dependency Check"
timeoutInMinutes: 10
pool: sonic-ubuntu-1c
steps:
- template: .azure-pipelines/dependency-check.yml
- job: markers_check
displayName: "Markers Check"
timeoutInMinutes: 10
pool: sonic-ubuntu-1c
steps:
- template: .azure-pipelines/markers-check.yml
- job: meta_check
displayName: "Meta check"
timeoutInMinutes: 10
pool: sonic-ubuntu-1c
steps:
- template: .azure-pipelines/meta-check.yml
- stage: Test
dependsOn: Pre_test
condition: and(succeeded(), in(dependencies.Pre_test.result, 'Succeeded'))
variables:
- group: SONiC-Elastictest
- name: BUILD_BRANCH
${{ if eq(variables['Build.Reason'], 'PullRequest') }}:
value: $(System.PullRequest.TargetBranch)
${{ else }}:
value: $(Build.SourceBranchName)
jobs:
- template: .azure-pipelines/pr_test_template.yml