forked from envoyproxy/envoy
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
yaml: Lint CI and repo configs (envoyproxy#16844)
Signed-off-by: Ryan Northey <[email protected]>
- Loading branch information
Showing
11 changed files
with
757 additions
and
758 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,85 +1,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" | ||
- 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 | ||
- 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: .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: | | ||
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 }} | ||
- 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) | ||
- 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" | ||
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() | ||
- 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: 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() | ||
- task: PublishBuildArtifacts@1 | ||
inputs: | ||
pathtoPublish: "$(Build.StagingDirectory)/envoy" | ||
artifactName: ${{ parameters.ciTarget }}${{ parameters.artifactSuffix }} | ||
condition: always() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.