Skip to content

Commit 1b2219b

Browse files
lizanmattklein123
authored andcommitted
ci: remove deprecated bazel --batch option (istio#4166)
Signed-off-by: Lizan Zhou <[email protected]>
1 parent 2db6a4c commit 1b2219b

File tree

2 files changed

+16
-16
lines changed

2 files changed

+16
-16
lines changed

ci/do_ci.sh

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ echo "building using ${NUM_CPUS} CPUs"
1717
function bazel_release_binary_build() {
1818
echo "Building..."
1919
cd "${ENVOY_CI_DIR}"
20-
bazel --batch build ${BAZEL_BUILD_OPTIONS} -c opt //source/exe:envoy-static
20+
bazel build ${BAZEL_BUILD_OPTIONS} -c opt //source/exe:envoy-static
2121
# Copy the envoy-static binary somewhere that we can access outside of the
2222
# container.
2323
cp -f \
@@ -35,7 +35,7 @@ function bazel_release_binary_build() {
3535
function bazel_debug_binary_build() {
3636
echo "Building..."
3737
cd "${ENVOY_CI_DIR}"
38-
bazel --batch build ${BAZEL_BUILD_OPTIONS} -c dbg //source/exe:envoy-static
38+
bazel build ${BAZEL_BUILD_OPTIONS} -c dbg //source/exe:envoy-static
3939
# Copy the envoy-static binary somewhere that we can access outside of the
4040
# container.
4141
cp -f \
@@ -61,14 +61,14 @@ if [[ "$1" == "bazel.release" ]]; then
6161
echo "Testing $* ..."
6262
# Run only specified tests. Argument can be a single test
6363
# (e.g. '//test/common/common:assert_test') or a test group (e.g. '//test/common/...')
64-
bazel --batch test ${BAZEL_TEST_OPTIONS} -c opt $*
64+
bazel test ${BAZEL_TEST_OPTIONS} -c opt $*
6565
else
6666
echo "Testing..."
6767
# We have various test binaries in the test directory such as tools, benchmarks, etc. We
6868
# run a build pass to make sure they compile.
69-
bazel --batch build ${BAZEL_BUILD_OPTIONS} -c opt //include/... //source/... //test/...
69+
bazel build ${BAZEL_BUILD_OPTIONS} -c opt //include/... //source/... //test/...
7070
# Now run all of the tests which should already be compiled.
71-
bazel --batch test ${BAZEL_TEST_OPTIONS} -c opt //test/...
71+
bazel test ${BAZEL_TEST_OPTIONS} -c opt //test/...
7272
fi
7373
exit 0
7474
elif [[ "$1" == "bazel.release.server_only" ]]; then
@@ -81,7 +81,7 @@ elif [[ "$1" == "bazel.debug" ]]; then
8181
echo "bazel debug build with tests..."
8282
bazel_debug_binary_build
8383
echo "Testing..."
84-
bazel --batch test ${BAZEL_TEST_OPTIONS} -c dbg //test/...
84+
bazel test ${BAZEL_TEST_OPTIONS} -c dbg //test/...
8585
exit 0
8686
elif [[ "$1" == "bazel.debug.server_only" ]]; then
8787
setup_gcc_toolchain
@@ -93,15 +93,15 @@ elif [[ "$1" == "bazel.asan" ]]; then
9393
echo "bazel ASAN/UBSAN debug build with tests..."
9494
cd "${ENVOY_FILTER_EXAMPLE_SRCDIR}"
9595
echo "Building and testing..."
96-
bazel --batch test ${BAZEL_TEST_OPTIONS} -c dbg --config=clang-asan @envoy//test/... \
96+
bazel test ${BAZEL_TEST_OPTIONS} -c dbg --config=clang-asan @envoy//test/... \
9797
//:echo2_integration_test //:envoy_binary_test
9898
exit 0
9999
elif [[ "$1" == "bazel.tsan" ]]; then
100100
setup_clang_toolchain
101101
echo "bazel TSAN debug build with tests..."
102102
cd "${ENVOY_FILTER_EXAMPLE_SRCDIR}"
103103
echo "Building and testing..."
104-
bazel --batch test ${BAZEL_TEST_OPTIONS} -c dbg --config=clang-tsan @envoy//test/... \
104+
bazel test ${BAZEL_TEST_OPTIONS} -c dbg --config=clang-tsan @envoy//test/... \
105105
//:echo2_integration_test //:envoy_binary_test
106106
exit 0
107107
elif [[ "$1" == "bazel.dev" ]]; then
@@ -110,14 +110,14 @@ elif [[ "$1" == "bazel.dev" ]]; then
110110
echo "bazel fastbuild build with tests..."
111111
cd "${ENVOY_CI_DIR}"
112112
echo "Building..."
113-
bazel --batch build ${BAZEL_BUILD_OPTIONS} -c fastbuild //source/exe:envoy-static
113+
bazel build ${BAZEL_BUILD_OPTIONS} -c fastbuild //source/exe:envoy-static
114114
# Copy the envoy-static binary somewhere that we can access outside of the
115115
# container for developers.
116116
cp -f \
117117
"${ENVOY_CI_DIR}"/bazel-bin/source/exe/envoy-static \
118118
"${ENVOY_DELIVERY_DIR}"/envoy-fastbuild
119119
echo "Building and testing..."
120-
bazel --batch test ${BAZEL_TEST_OPTIONS} -c fastbuild //test/...
120+
bazel test ${BAZEL_TEST_OPTIONS} -c fastbuild //test/...
121121
exit 0
122122
elif [[ "$1" == "bazel.ipv6_tests" ]]; then
123123
# This is around until Circle supports IPv6. We try to run a limited set of IPv6 tests as fast
@@ -136,15 +136,15 @@ elif [[ "$1" == "bazel.ipv6_tests" ]]; then
136136
setup_clang_toolchain
137137
echo "Testing..."
138138
cd "${ENVOY_CI_DIR}"
139-
bazel --batch test ${BAZEL_TEST_OPTIONS} -c fastbuild //test/integration/... //test/common/network/...
139+
bazel test ${BAZEL_TEST_OPTIONS} -c fastbuild //test/integration/... //test/common/network/...
140140
exit 0
141141
elif [[ "$1" == "bazel.api" ]]; then
142142
setup_clang_toolchain
143143
cd "${ENVOY_CI_DIR}"
144144
echo "Building API..."
145-
bazel --batch build ${BAZEL_BUILD_OPTIONS} -c fastbuild @envoy_api//envoy/...
145+
bazel build ${BAZEL_BUILD_OPTIONS} -c fastbuild @envoy_api//envoy/...
146146
echo "Testing API..."
147-
bazel --batch test ${BAZEL_TEST_OPTIONS} -c fastbuild @envoy_api//test/... @envoy_api//tools/... \
147+
bazel test ${BAZEL_TEST_OPTIONS} -c fastbuild @envoy_api//test/... @envoy_api//tools/... \
148148
@envoy_api//tools:capture2pcap_test
149149
exit 0
150150
elif [[ "$1" == "bazel.coverage" ]]; then
@@ -154,7 +154,7 @@ elif [[ "$1" == "bazel.coverage" ]]; then
154154
# gcovr is a pain to run with `bazel run`, so package it up into a
155155
# relocatable and hermetic-ish .par file.
156156
cd "${ENVOY_SRCDIR}"
157-
bazel --batch build @com_github_gcovr_gcovr//:gcovr.par
157+
bazel build @com_github_gcovr_gcovr//:gcovr.par
158158
export GCOVR="${ENVOY_SRCDIR}/bazel-bin/external/com_github_gcovr_gcovr/gcovr.par"
159159

160160
export GCOVR_DIR="${ENVOY_BUILD_DIR}/bazel-envoy"
@@ -181,7 +181,7 @@ elif [[ "$1" == "bazel.coverity" ]]; then
181181
echo "bazel Coverity Scan build"
182182
echo "Building..."
183183
cd "${ENVOY_CI_DIR}"
184-
/build/cov-analysis/bin/cov-build --dir "${ENVOY_BUILD_DIR}"/cov-int bazel --batch build --action_env=LD_PRELOAD ${BAZEL_BUILD_OPTIONS} \
184+
/build/cov-analysis/bin/cov-build --dir "${ENVOY_BUILD_DIR}"/cov-int bazel build --action_env=LD_PRELOAD ${BAZEL_BUILD_OPTIONS} \
185185
-c opt //source/exe:envoy-static
186186
# tar up the coverity results
187187
tar czvf "${ENVOY_BUILD_DIR}"/envoy-coverity-output.tgz -C "${ENVOY_BUILD_DIR}" cov-int

docs/build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ fi
4343

4444
source "${BUILD_DIR}"/venv/bin/activate
4545

46-
bazel --batch build ${BAZEL_BUILD_OPTIONS} @envoy_api//docs:protos --aspects \
46+
bazel build ${BAZEL_BUILD_OPTIONS} @envoy_api//docs:protos --aspects \
4747
tools/protodoc/protodoc.bzl%proto_doc_aspect --output_groups=rst --action_env=CPROFILE_ENABLED --spawn_strategy=standalone
4848

4949
# These are the protos we want to put in docs, this list will grow.

0 commit comments

Comments
 (0)