Skip to content

Commit

Permalink
build: cleanup ci/.bazelrc. (#4978)
Browse files Browse the repository at this point in the history
Using cp results in:
cp: '/source/.bazelrc' and '/build/envoy-filter-example/.bazelrc' are the same file

*Risk Level*: Low
*Testing*: ./ci/run_envoy_docker.sh './ci/do_circle_ci.sh bazel.dev'
*Docs Changes*: n/a
*Release Notes*: n/a

Broken in #4666.

Signed-off-by: Piotr Sikora <piotrsikora@google.com>
  • Loading branch information
PiotrSikora authored and mattklein123 committed Nov 7, 2018
1 parent ce5621f commit 74de08a
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions ci/build_setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,19 @@ mkdir -p "${ENVOY_COVERAGE_DIR}"
# This is where we build for bazel.release* and bazel.dev.
export ENVOY_CI_DIR="${ENVOY_SRCDIR}"/ci

function cleanup() {
# Remove build artifacts. This doesn't mess with incremental builds as these
# are just symlinks.
rm -rf "${ENVOY_SRCDIR}"/bazel-*
rm -rf "${ENVOY_CI_DIR}"/bazel-*
rm -rf "${ENVOY_CI_DIR}"/bazel
rm -rf "${ENVOY_CI_DIR}"/tools
rm -f "${ENVOY_CI_DIR}"/.bazelrc
}

cleanup
trap cleanup EXIT

# Hack due to https://github.com/envoyproxy/envoy/issues/838 and the need to have
# .bazelrc available for build linkstamping.
mkdir -p "${ENVOY_FILTER_EXAMPLE_SRCDIR}"/bazel
Expand All @@ -123,13 +136,3 @@ ln -sf "${ENVOY_SRCDIR}"/tools/bazel.rc "${ENVOY_FILTER_EXAMPLE_SRCDIR}"/tools/
ln -sf "${ENVOY_SRCDIR}"/tools/bazel.rc "${ENVOY_CI_DIR}"/tools/

export BUILDIFIER_BIN="/usr/local/bin/buildifier"

function cleanup() {
# Remove build artifacts. This doesn't mess with incremental builds as these
# are just symlinks.
rm -rf "${ENVOY_SRCDIR}"/bazel-*
rm -rf "${ENVOY_CI_DIR}"/bazel-*
rm -rf "${ENVOY_CI_DIR}"/bazel
rm -rf "${ENVOY_CI_DIR}"/tools
}
trap cleanup EXIT

0 comments on commit 74de08a

Please sign in to comment.