mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
build: no longer use bazel from "ngcontainer" image
We no longer use Bazel from the `ngcontainer` image as it is no longer maintained and we need to use the latest version of Bazel in CircleCI. It's not ideal to use Bazel through Yarn since binaries like that should be actually part of the docker image, but for now we need to do this for jobs that use NodeJS & Bazel at the same time. This is similar to what `angulart/angular` does.
This commit is contained in:
committed by
Jeremy Elbourn
parent
f6d4acb44a
commit
2ce5ffd56b
@@ -7,13 +7,13 @@ if [[ -z "${GCP_DECRYPT_TOKEN}" ]]; then
|
||||
fi
|
||||
|
||||
# Decode the GCP token that is needed to authenticate the Bazel remote execution.
|
||||
openssl aes-256-cbc -d -in .circleci/gcp_token -k ${GCP_DECRYPT_TOKEN} \
|
||||
-out /home/circleci/.gcp_credentials
|
||||
openssl aes-256-cbc -d -in .circleci/gcp_token -md md5 -k ${GCP_DECRYPT_TOKEN} \
|
||||
-out /home/.gcp_credentials
|
||||
|
||||
# Export the "GOOGLE_APPLICATION_CREDENTIALS" variable that should refer to the GCP credentials
|
||||
# file. Bazel automatically picks up the credentials from that variable.
|
||||
# https://github.com/bazelbuild/bazel/blob/master/third_party/grpc/include/grpc/grpc_security.h#L134-L137
|
||||
echo "export GOOGLE_APPLICATION_CREDENTIALS=/home/circleci/.gcp_credentials" >> $BASH_ENV
|
||||
echo "export GOOGLE_APPLICATION_CREDENTIALS=/home/.gcp_credentials" >> $BASH_ENV
|
||||
|
||||
# Update the global Bazel configuration to always use remote execution.
|
||||
sudo bash -c "echo 'build --config=remote' >> /etc/bazel.bazelrc"
|
||||
# Update the CircleCI Bazel configuration to always use remote execution.
|
||||
echo 'build --config=remote' >> .circleci/bazel.rc
|
||||
|
||||
Reference in New Issue
Block a user