#!/bin/bash
# Build a Docker image using Bazel.
set -ex

_WORKSPACE_DIR=$1
_CHECKOUT_DIR=$2
_BAZEL_PACKAGE=$3
_BAZEL_TARGET=$4
_IMAGE_PATH=$5

pushd ${_WORKSPACE_DIR}/${_CHECKOUT_DIR}
bazelisk run --config=remote --google_default_credentials //${_BAZEL_PACKAGE}:${_BAZEL_TARGET}
image_tag="${_IMAGE_PATH}:$(USER="louhi" ${_WORKSPACE_DIR}/${_CHECKOUT_DIR}/bash/release_tag.sh)"
echo "$image_tag" > ${_WORKSPACE_DIR}/${_BAZEL_TARGET}.tag
docker tag bazel/${_BAZEL_PACKAGE}:${_BAZEL_TARGET} louhi_ws/$image_tag
#!/bin/bash
# Build a Docker image using Bazel.
set -ex

_WORKSPACE_DIR=$1
_CHECKOUT_DIR=$2
_BAZEL_PACKAGE=$3
_BAZEL_TARGET=$4
_IMAGE_PATH=$5

pushd ${_WORKSPACE_DIR}/${_CHECKOUT_DIR}
bazelisk run //${_BAZEL_PACKAGE}:${_BAZEL_TARGET}
image_tag="${_IMAGE_PATH}:$(USER="louhi" ${_WORKSPACE_DIR}/${_CHECKOUT_DIR}/bash/release_tag.sh)"
echo "$image_tag" > ${_WORKSPACE_DIR}/${_BAZEL_TARGET}.tag
docker tag bazel/${_BAZEL_PACKAGE}:${_BAZEL_TARGET} louhi_ws/$image_tag
--- 
+++ 
@@ -9,7 +9,7 @@
 _IMAGE_PATH=$5
 
 pushd ${_WORKSPACE_DIR}/${_CHECKOUT_DIR}
-bazelisk run --config=remote --google_default_credentials //${_BAZEL_PACKAGE}:${_BAZEL_TARGET}
+bazelisk run //${_BAZEL_PACKAGE}:${_BAZEL_TARGET}
 image_tag="${_IMAGE_PATH}:$(USER="louhi" ${_WORKSPACE_DIR}/${_CHECKOUT_DIR}/bash/release_tag.sh)"
 echo "$image_tag" > ${_WORKSPACE_DIR}/${_BAZEL_TARGET}.tag
 docker tag bazel/${_BAZEL_PACKAGE}:${_BAZEL_TARGET} louhi_ws/$image_tag
[BCID] Build using RBE in Louhi

I'm not sure why this didn't make it over from the other repo.

Change-Id: I5088d08cf6933326cf84f5f6374b993a3cbdc096
Reviewed-on: https://skia-review.googlesource.com/c/buildbot/+/582819
Reviewed-by: Ravi Mistry <9fa2e7438b8cb730f96b74865492597170561628@google.com>
Commit-Queue: Eric Boren <0e499112533c8544f0505ea0d08394fb5ad7d8fa@google.com>
Auto-Submit: Eric Boren <0e499112533c8544f0505ea0d08394fb5ad7d8fa@google.com>
Commit-Queue: Ravi Mistry <9fa2e7438b8cb730f96b74865492597170561628@google.com>
