forked from envoyproxy/envoy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bazel.yml
85 lines (76 loc) · 2.65 KB
/
bazel.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
parameters:
- name: ciTarget
displayName: "CI target"
type: string
default: bazel.release
- name: artifactSuffix
displayName: "Suffix of artifact"
type: string
default: ""
- name: rbe
displayName: "Enable RBE"
type: boolean
default: true
- name: managedAgent
type: boolean
default: true
- name: bazelBuildExtraOptions
type: string
default: "--flaky_test_attempts=2"
steps:
- task: Cache@2
inputs:
key: '"${{ parameters.ciTarget }}" | ./WORKSPACE | **/*.bzl'
path: $(Build.StagingDirectory)/repository_cache
continueOnError: true
- bash: .azure-pipelines/cleanup.sh
displayName: "Removing tools from agent"
condition: ${{ parameters.managedAgent }}
- bash: |
echo "disk space at beginning of build:"
df -h
displayName: "Check disk space at beginning"
- bash: |
sudo mkdir -p /etc/docker
echo '{
"ipv6": true,
"fixed-cidr-v6": "2001:db8:1::/64"
}' | sudo tee /etc/docker/daemon.json
sudo service docker restart
displayName: "Enable IPv6"
condition: ${{ parameters.managedAgent }}
- script: ci/run_envoy_docker.sh 'ci/do_ci.sh ${{ parameters.ciTarget }}'
workingDirectory: $(Build.SourcesDirectory)
env:
ENVOY_DOCKER_BUILD_DIR: $(Build.StagingDirectory)
SLACK_TOKEN: $(SLACK_TOKEN)
REPO_URI: $(Build.Repository.Uri)
BUILD_URI: $(Build.BuildUri)
${{ if parameters.rbe }}:
ENVOY_RBE: "1"
BAZEL_BUILD_EXTRA_OPTIONS: "--config=remote-ci --jobs=$(RbeJobs) ${{ parameters.bazelBuildExtraOptions }}"
BAZEL_REMOTE_CACHE: grpcs://remotebuildexecution.googleapis.com
BAZEL_REMOTE_INSTANCE: projects/envoy-ci/instances/default_instance
GCP_SERVICE_ACCOUNT_KEY: $(GcpServiceAccountKey)
${{ if eq(parameters.rbe, false) }}:
BAZEL_BUILD_EXTRA_OPTIONS: "${{ parameters.bazelBuildExtraOptions }}"
BAZEL_REMOTE_CACHE: $(LocalBuildCache)
displayName: "Run CI script"
- bash: |
echo "disk space at end of build:"
df -h
# Cleanup offending files with unicode names
rm -rf $(Build.StagingDirectory)/tmp/*/*/external/go_sdk/test/fixedbugs
displayName: "Check disk space at end"
condition: always()
- task: PublishTestResults@2
inputs:
testResultsFiles: "**/bazel-out/**/testlogs/**/test.xml"
testRunTitle: "${{ parameters.ciTarget }}"
searchFolder: $(Build.StagingDirectory)/tmp
condition: always()
- task: PublishBuildArtifacts@1
inputs:
pathtoPublish: "$(Build.StagingDirectory)/envoy"
artifactName: ${{ parameters.ciTarget }}${{ parameters.artifactSuffix }}
condition: always()