Skip to content

Commit

Permalink
Create image with bazel 4.1.0 and 3.5.0 (bazelbuild#664)
Browse files Browse the repository at this point in the history
  • Loading branch information
fejta authored Aug 6, 2021
1 parent 8086289 commit e27fcaf
Show file tree
Hide file tree
Showing 5 changed files with 64 additions and 76 deletions.
31 changes: 21 additions & 10 deletions images/gcloud-bazel/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,28 @@

# Ubuntu with bazel, gcloud and its dependencies preinstalled.

ARG NEW_VERSION
ARG OLD_VERSION
FROM launcher.gcr.io/google/bazel:${OLD_VERSION} as old
FROM launcher.gcr.io/google/bazel:${NEW_VERSION}
FROM ubuntu:18.04
# Based off github.com/kubernetes/test-infra/images/bazelbuild
LABEL maintainer="[email protected]"

# See https://docs.bazel.build/versions/main/install-ubuntu.html
RUN apt update \
&& apt install -y --no-install-recommends \
gnupg \
ca-certificates
COPY bazel.pub.gpg bazel.list /
RUN gpg -o /etc/apt/trusted.gpg.d/bazel.gpg --dearmor /bazel.pub.gpg \
&& rm /bazel.pub.gpg \
&& mv /bazel.list /etc/apt/sources.list.d/bazel.list

ARG NEW_VERSION
ARG OLD_VERSION
RUN apt update \
&& apt install -y --no-install-recommends \
"bazel-${NEW_VERSION}" \
"bazel-${OLD_VERSION}"


# See the following docs:
# * https://cloud.google.com/sdk/docs/install#deb

Expand All @@ -37,14 +52,10 @@ COPY sources.list /etc/apt/sources.list.d/google-cloud-sdk.list
# * kubectl: needed by rules_k8s
# * pip setuptools wheel: needed by python rules
# * python-pip: needed by python rules
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
RUN apt update \
&& apt install -y --no-install-recommends \
google-cloud-sdk \
kubectl \
python-pip \
&& apt-get clean \
&& pip install pip setuptools wheel

ARG OLD_VERSION
COPY --from=old \
/usr/local/lib/bazel/bin/bazel-real /usr/local/lib/bazel/bin/bazel-${OLD_VERSION}
7 changes: 3 additions & 4 deletions images/gcloud-bazel/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,13 @@
# limitations under the License.

PROJECT ?= rules-k8s
# gcr.io/rule-k8s/gcloud-bazel by default
IMG = gcr.io/$(PROJECT)/gcloud-bazel
OLD ?= 3.0.0
NEW ?= 3.5.0
OLD ?= 3.5.0
NEW ?= 4.1.0
TAG := $(shell date +v%Y%m%d)-$(shell git describe --tags --always --dirty)

build:
docker build --pull -t $(IMG):latest-$(USER) .
docker build --pull -t $(IMG):latest-$(USER) --build-arg OLD_VERSION=$(OLD) --build-arg NEW_VERSION=$(NEW) .

push:
gcloud builds submit \
Expand Down
1 change: 1 addition & 0 deletions images/gcloud-bazel/bazel.list
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
deb [arch=amd64] https://storage.googleapis.com/bazel-apt stable jdk1.8
97 changes: 37 additions & 60 deletions images/gcloud-bazel/bazel.pub.gpg
Original file line number Diff line number Diff line change
Expand Up @@ -12,64 +12,41 @@ PnKju1SKl5iwzfDQGpi6u6UAMFmc53EaH05naYDAigCueZ+/2rIaY358bECK6/VR
kyrBqpeq6VkWUeOkt03VqoPzrw4gEzRvfRtLj+D2j/pZCH3vyMYHzbaaXBv6AT0e
RmgtGo9I9BYqKSWlGEF0D+CQ3uZfOyovvrbYqNaHynFBtrx/ZkM82gMA5QARAQAB
tEdCYXplbCBEZXZlbG9wZXIgKEJhemVsIEFQVCByZXBvc2l0b3J5IGtleSkgPGJh
emVsLWRldkBnb29nbGVncm91cHMuY29tPokCHAQQAQgABgUCWBNy9QAKCRDdPvlj
mR8ewjP7D/9B9pm7jjwxVfvc7Rw1w9wu+3R94X9pmZAt6Jl5BvhOkHNM/oKM2Q4P
6oRyzJDAHUAirFIkUeW9kxbsB01O+ryS6BUR6pKFK2vxliqiOGuZ1Ha65nl6JsL5
UXQGrE7fZ3/I6QuNv6IodmBQypoQB/RZ4AORZGhuAE9Acuxw4oZLAB95vcFf8hMS
BCLDmYZknINjeh3wz+IjqR8hhJ4IgSWXpy/Ju7LHlSOK7G2ipXCeOdBVb0b+oHYR
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v9WJKH4JcCHd0/XDGdys6EXeATIIRxchumkmxpIg87OhsC0n5yuH1FnFIFQEjbYX
bb46F7ZFT+8Tov+lgMEw4CZmps4uvvZlKbIH4Zi/ULiobwvm2ad3nejWICmGmHYz
ro6t08hdcY6GnOzCpDwx9yHechMCkU3KEE98nb/CxcmA4VzDHudTJe7o0OyaSarh
6D5WcXf7D9FfcKmUD9xaCsfXh66OCksMVGE1JctrO1wQTF2jTdTUq7mmi30tlM+o
JjVk65OSOd4JYol8auzE4oXOfsNzXbyvj7WzM1v5m7C45jOL+Ly7I3IUzZNfF41J
AMmSd73EOoR9YH4qTrL3jx69Ekf7ww70Qea5enLE8xUgQfGTOaEHxkFcEovmzv54
6IVe083iK8alXD/9OUTaDY9NwMnOn1K1aU2XOfliGGLgwwaHg+wVFh5rZIHsDl7v
=Embu
-----END PGP PUBLIC KEY BLOCK-----
4 changes: 2 additions & 2 deletions images/gcloud-bazel/cloudbuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ steps:

substitutions:
_IMG: gcr.io/${PROJECT_ID}/gcloud-bazel
_NEW_VERSION: 3.0.0
_OLD_VERSION: 2.2.0
_NEW_VERSION: 4.1.0
_OLD_VERSION: 3.5.0

images:
- ${_IMG}:latest
Expand Down

0 comments on commit e27fcaf

Please sign in to comment.