Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: save a few GB disk space #10669

Merged
merged 3 commits into from
Apr 6, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .azure-pipelines/bazel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ steps:
env:
ENVOY_DOCKER_BUILD_DIR: $(Build.StagingDirectory)
ENVOY_RBE: "true"
BAZEL_BUILD_EXTRA_OPTIONS: "--config=remote-ci --jobs=$(RbeJobs) --curses=no"
# Use https://docs.bazel.build/versions/master/command-line-reference.html#flag--experimental_repository_cache_hardlinks
# to save disk space.
BAZEL_BUILD_EXTRA_OPTIONS: "--config=remote-ci --jobs=$(RbeJobs) --curses=no --experimental_repository_cache_hardlinks"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a comment on what this does and why we set it?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

BAZEL_REMOTE_CACHE: grpcs://remotebuildexecution.googleapis.com
BAZEL_REMOTE_INSTANCE: projects/envoy-ci/instances/default_instance
GCP_SERVICE_ACCOUNT_KEY: $(GcpServiceAccountKey)
Expand Down
4 changes: 4 additions & 0 deletions ci/do_ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ function cp_binary_for_image_build() {

# Copy for azp which doesn't preserve permissions, creating a tar archive
tar czf "${ENVOY_BUILD_DIR}"/envoy_binary.tar.gz -C "${ENVOY_SRCDIR}" build_"$1" build_"$1"_stripped

# Remove binaries to save space, only if BUILD_REASON exists (running in AZP)
[[ -z "${BUILD_REASON}" ]] || \
rm -rf "${ENVOY_SRCDIR}"/build_"$1" "${ENVOY_SRCDIR}"/build_"$1"_stripped "${ENVOY_DELIVERY_DIR}"/envoy
}

function bazel_binary_build() {
Expand Down
5 changes: 3 additions & 2 deletions test/integration/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -633,8 +633,9 @@ envoy_cc_test(
srcs = [
"echo_integration_test.cc",
],
# This test must be run in exclusive mode: see comments in AddRemoveListener
tags = ["exclusive"],
# Uncomment this line to run this test repeatedly in exclusive mode if not using docker-sandbox,
# or RBE, see comments in AddRemoveListener.
# tags = ["exclusive"],
deps = [
":integration_lib",
"//source/extensions/filters/network/echo:config",
Expand Down