summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAyush Ranjan <ayushranjan@google.com>2020-07-23 07:27:35 -0700
committergVisor bot <gvisor-bot@google.com>2020-07-23 07:29:06 -0700
commitc9399797d8defbdb41f483d0bdbeb96c5777c82f (patch)
tree8fa3cd2e23bb8e04a2981420b4c7242f2069cbf7
parentbd98f820141208d9f19b0e12dee93f6f6de3ac97 (diff)
Fix kokoro presubmits!
Fixed the following error: tools/bazel.mk:119: *** Destination not provided.. Stop. The issue was that we were running all make commands in a subshell so variables like $T were not passed on. The other issue was related to credentials. The test passed locally but not on kokoro, the only difference in the workflow was the credentials bit. Also fixed up some other tiny issues I came across, were not blockers. PiperOrigin-RevId: 322782457
-rw-r--r--Makefile2
-rw-r--r--tools/bazel.mk7
2 files changed, 3 insertions, 6 deletions
diff --git a/Makefile b/Makefile
index 9806e9901..b44eda445 100644
--- a/Makefile
+++ b/Makefile
@@ -16,7 +16,7 @@
# Helpful pretty-printer.
MAKEBANNER := \033[1;34mmake\033[0m
-submake = echo -e '$(MAKEBANNER) $1' >&2; sh -c '$(MAKE) $1'
+submake = echo -e '$(MAKEBANNER) $1' >&2; $(MAKE) $1
# Described below.
OPTIONS :=
diff --git a/tools/bazel.mk b/tools/bazel.mk
index b6f23fe7e..e27e907ab 100644
--- a/tools/bazel.mk
+++ b/tools/bazel.mk
@@ -30,9 +30,6 @@ DOCKER_SOCKET := /var/run/docker.sock
# Bazel flags.
OPTIONS += --test_output=errors --keep_going --verbose_failures=true
-ifneq ($(AUTH_CREDENTIALS),)
-OPTIONS += --auth_credentials=${AUTH_CREDENTIALS} --config=remote
-endif
BAZEL := bazel $(STARTUP_OPTIONS)
# Non-configurable.
@@ -71,7 +68,7 @@ SHELL=/bin/bash -o pipefail
bazel-server-start: load-default ## Starts the bazel server.
@mkdir -p $(BAZEL_CACHE)
@mkdir -p $(GCLOUD_CONFIG)
- @if docker ps --all | grep $(DOCKER_NAME); then docker rm $(DOCKER_NAME); fi
+ @if docker ps --all | grep $(DOCKER_NAME); then docker rm -f $(DOCKER_NAME); fi
docker run -d --rm \
--init \
--name $(DOCKER_NAME) \
@@ -102,7 +99,7 @@ bazel-server: ## Ensures that the server exists. Used as an internal target.
@docker exec $(DOCKER_NAME) true || $(MAKE) bazel-server-start
.PHONY: bazel-server
-build_cmd = docker exec --user $(UID):$(GID) -i $(DOCKER_NAME) sh -o pipefail -c '$(BAZEL) $(STARTUP_OPTIONS) build $(OPTIONS) $(TARGETS)'
+build_cmd = docker exec --user $(UID):$(GID) -i $(DOCKER_NAME) sh -o pipefail -c '$(BAZEL) build $(OPTIONS) $(TARGETS)'
build_paths = $(build_cmd) 2>&1 \
| tee /proc/self/fd/2 \