-
Notifications
You must be signed in to change notification settings - Fork 1
/
pipelines.yml
94 lines (79 loc) · 3.12 KB
/
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
88
89
90
91
92
93
94
trigger:
branches:
include:
- "main"
- "release/v*"
tags:
include:
- "v*"
# PR build config is manually overridden in Azure pipelines UI with different secrets
pr: none
variables:
- name: agentUbuntu
value: ubuntu-22.04
- name: isDev
# This must be checked/set in a `step` from the VERSION.txt file, in order to be useful
value: true
- name: isMain
value: $[eq(variables['Build.SourceBranch'], 'refs/heads/main')]
- name: isReleaseBranch
value: $[startsWith(variables['Build.SourceBranch'], 'refs/heads/release/v')]
- name: isTaggedRelease
value: $[startsWith(variables['Build.SourceBranch'], 'refs/tags/v')]
- name: isStableBranch
# A release branch can be either `main` or a `release/v1.x` stable branch
value: $[or(eq(variables['isMain'], 'true'), eq(variables['isReleaseBranch'], 'true'))]
## CI runs
# Any scheduled run
- name: pipelineScheduled
value: ${{ eq(variables['Build.Reason'], 'Schedule') }}
# Non-scheduled postsubmit run
- name: pipelinePostsubmit
value: ${{ and(eq(variables['Build.DefinitionName'], 'envoy-postsubmit'), ne(variables.pipelineScheduled, true)) }}
- name: pipelineCacheWarm
value: ${{ and(eq(variables['Build.DefinitionName'], 'envoy-presubmit'), ne(variables['Build.Reason'], 'PullRequest')) }}
# Any other run (ie PRs)
- name: pipelineDefault
value: ${{ and(ne(variables.pipelineScheduled, true), ne(variables.pipelinePostsubmit, true), ne(variables.pipelineCacheWarm, true)) }}
## Variable settings
# Caches (tip: append a version suffix while testing caches)
- name: cacheKeyVersion
value: v3
- name: cacheKeyBazel
value: '.bazelversion | ./WORKSPACE | **/*.bzl, !mobile/**, !envoy-docs/**'
- name: cacheKeyDocker
value: ".bazelrc"
- name: pathCacheTemp
value: /mnt/cache
- name: pathDockerBind
value: /mnt/docker
- name: authGithubSSHKeyPublic
value: "github.com ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCj7ndNxQowgcQnjshcLrqPEiiphnt+VTTvDP6mHBL9j1aNUkY4Ue1gvwnGLVlOhGeYrnZaMgRK6+PKCUXaDbC7qtbW8gIkhL7aGCsOr/C56SJMy/BCZfxd1nWzAOxSDPgVsmerOBYfNqltV9/hWCqBywINIR+5dIg6JTJ72pcEpEjcYgXkE2YEFXV1JHnsKgbLWNlhScqb2UmyRkQyytRLtL+38TGxkxCflmO+5Z8CSSNY7GidjMIZ7Q4zMjA2n1nGrlTDkzwDCsw+wqFPGQA179cnfGWOWRVruj16z6XyvxvjJwbz0wQZ75XK5tKSb7FNyeIEs4TT4jk+S4dhPeAUC5y+bDYirYgM4GC7uEnztnZyaVWQ7B381AK4Qdrwt51ZqExKbQpTUNn+EjqoTwvqNj4kqx5QUCI0ThS/YkOxJCXmPUWZbhjpCg56i+2aB6CmK2JGhn57K5mj0MNdBXA4/WnwH6XoPWJzK5Nyu2zB3nAZp+S5hpQs+p1vN1/wsjk="
stages:
# Presubmit/default
- ${{ if eq(variables.pipelineDefault, true) }}:
- template: stages.yml
# Scheduled run anywhere
- ${{ if eq(variables.pipelineScheduled, true) }}:
- template: stages.yml
parameters:
cacheTestResults: false
# Cache warming in presubmit
- ${{ if eq(variables.pipelineCacheWarm, true) }}:
- template: stages.yml
parameters:
buildStageDeps:
- env
checkStageDeps:
- env
# Postsubmit main/release branches
- ${{ if eq(variables.pipelinePostsubmit, true) }}:
- template: stages.yml
parameters:
# Build/publish can take longer in postsubmit, esp during release
timeoutDockerBuild: 720
timeoutDockerPublish: 30
buildStageDeps:
- env
checkStageDeps:
- env