Skip to content

Commit

Permalink
Build a new bazel docker image
Browse files Browse the repository at this point in the history
This is necessary because the new rules_go and gazelle versions require
a version of bazel newer than what's in the GCR docker image pre-built
by the bazel team. Apparently, they stopped building those in 2020.

bazelbuild/continuous-integration#1060

Signed-off-by: Chris Koch <chrisko@google.com>
  • Loading branch information
hugelgupf committed Mar 28, 2022
1 parent eaf939d commit f2920bd
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ templates:

bazel-template: &bazel-template
docker:
- image: l.gcr.io/google/bazel:latest
working_directory: /go/bazel_gobusybox
- image: us-docker.pkg.dev/u-root-ci/gobusybox/test-bazel:v0.0.1
working_directory: /home/circleci/go/bazel_gobusybox
environment:
- GOPATH: "/go"
- GOPATH: "/home/circleci/go"
resource_class: large

build-gomod-template: &build-gomod-template
Expand Down
11 changes: 11 additions & 0 deletions .circleci/images/test-bazel/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@

FROM cimg/base:2022.03

RUN sudo apt install apt-transport-https curl gnupg; \
curl -fsSL https://bazel.build/bazel-release.pub.gpg | \
gpg --dearmor > bazel.gpg; \
sudo mv bazel.gpg /etc/apt/trusted.gpg.d/; \
echo "deb [arch=amd64] https://storage.googleapis.com/bazel-apt stable jdk1.8" | sudo tee /etc/apt/sources.list.d/bazel.list;

RUN sudo apt-get update && \
sudo apt-get install -y --no-install-recommends bazel;

0 comments on commit f2920bd

Please sign in to comment.