forked from envoyproxy/envoy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathenv.yml
129 lines (120 loc) · 3.92 KB
/
env.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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
#
# Note to use the outputs created here - this `stage` must be set as a dependency in the relevant stage
# eg:
#
# stage: mystage
# dependsOn: ["env"]
#
# To use a variable as a condition for a `stage` you can specify it as follows:
#
# condition: and(not(canceled()), succeeded(), ne(dependencies.env.outputs['repo.changed.mobileOnly'], 'true'))
#
# To use a variable as a condition for a `job` you can specify it as follows:
#
# job:
# condition: and(not(canceled()), succeeded(), ne(stageDependencies.env.repo.outputs['changed.mobileOnly'], 'true'))
#
# NB: Avoid using _inclusive_ lists to trigger CI - eg _dont_ only trigger mobile CI if `mobile/` changed.
# Instead use _exclusive_ bools - eg _do_ suppress other CI if only `mobile/` changed
#
# Note the difference in name resolution when used in stages and jobs.
#
# Note also, other conditions such as `not(canceled())` are not assumed and so need to be added to
# any conditions explicitly.
#
# To use a variable in a `step` you can specify it as follows:
#
# stage: my_next_stage
# jobs:
# job: another_job
# variables:
# mobileOnly: $[stageDependencies.env.repo.outputs['changed.mobileOnly']]
# steps:
# - bash: echo $(mobileOnly)
#
jobs:
# Warm build image caches
- job: cache
displayName: Cache
pool:
vmImage: $(agentUbuntu)
steps:
- template: cached.yml
parameters:
prime: true
- job: cache_arm
dependsOn: []
displayName: Cache (arm64)
pool: envoy-arm-small
steps:
- template: cached.yml
parameters:
prime: true
arch: .arm64
- job: repo
dependsOn: []
displayName: Repository
pool:
vmImage: $(agentUbuntu)
steps:
- checkout: self
fetchDepth: 0
fetchTags: true
- script: ./.azure-pipelines/env/detect-repo-changes.sh
displayName: "Detect repo changes"
workingDirectory: $(Build.SourcesDirectory)
name: changed
env:
BUILD_REASON: $(Build.Reason)
TARGET_BRANCH: $(System.PullRequest.TargetBranch)
- script: ./.azure-pipelines/env/set-dev-release-envs.sh
displayName: Set development/release env
workingDirectory: $(Build.SourcesDirectory)
name: state
env:
BUILD_REASON: $(Build.Reason)
TARGET_BRANCH: $(System.PullRequest.TargetBranch)
- script: ./.azure-pipelines/env/decide-what-to-run.sh
displayName: "Decide what to run"
workingDirectory: $(Build.SourcesDirectory)
name: run
env:
BUILD_REASON: $(Build.Reason)
- script: ./.azure-pipelines/env/decide-what-to-publish.sh
displayName: "Decide what to publish"
workingDirectory: $(Build.SourcesDirectory)
name: publish
env:
BUILD_REASON: $(Build.Reason)
- bash: |
set -e
echo "env.outputs['changed.mobileOnly']: $(changed.mobileOnly)"
echo "env.outputs['changed.docsOnly']: $(changed.docsOnly)"
echo "env.outputs['changed.examplesOnly']: $(changed.examplesOnly)"
echo
echo "env.outputs['state.isDev']: $(state.isDev)"
echo "env.outputs['state.versionPatch']: $(state.versionPatch)"
echo
echo "env.outputs['run.build']: $(run.build)"
echo "env.outputs['run.checks']: $(run.checks)"
echo "env.outputs['run.packaging']: $(run.packaging)"
echo "env.outputs['run.releaseTests']: $(run.releaseTests)"
echo
echo "env.outputs['publish.githubRelease']: $(publish.githubRelease)"
echo "env.outputs['publish.dockerhub]: $(publish.dockerhub)"
displayName: "Print build environment"
- job: test_artifacts
dependsOn: []
displayName: Test artifacts
condition: ne(variables['Build.DefinitionName'], 'envoy-postsubmit')
pool:
vmImage: $(agentUbuntu)
steps:
- script: $(Build.SourcesDirectory)/.azure-pipelines/gpg/generate-test-key.sh
displayName: "Generate snakeoil GPG key for testing"
workingDirectory: $(Build.StagingDirectory)
- task: PublishBuildArtifacts@1
inputs:
pathtoPublish: "$(Build.StagingDirectory)/envoy"
artifactName: test.env
timeoutInMinutes: 10