diff --git a/.bazelversion b/.bazelversion index eab246c06..e7fdef7e2 100644 --- a/.bazelversion +++ b/.bazelversion @@ -1 +1 @@ -7.3.2 +8.4.2 diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 000000000..bcb96fc98 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,35 @@ +FROM gcr.io/cloud-marketplace/google/ubuntu2204:latest + +# minimal dependencies for getting bazel/bazelisk +# tzdata needed for some conformance tests. +RUN apt-get update && apt-get upgrade -y && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + build-essential \ + bash \ + ca-certificates \ + git \ + libssl-dev \ + make \ + pkg-config \ + python3 \ + tzdata \ + unzip \ + wget \ + zip \ + zlib1g-dev \ + default-jdk-headless && \ + apt-get clean + +ARG BAZELISK_RELEASE="https://github.com/bazelbuild/bazelisk/releases/download/v1.27.0/bazelisk-amd64.deb" +ARG BAZELISK_CHKSUM="sha256:d8b00ea975c823e15263c80200ac42979e17368547fbff4ab177af035badfa83" + +# cloud build doesn't support --checksum arg to add +ADD ${BAZELISK_RELEASE} /tmp/bazelisk.deb + +RUN apt-get install /tmp/bazelisk.deb + +RUN mkdir -p /workspace +RUN mkdir -p /bazel + +# note: /usr/bin/bazel is also a symlink to bazelisk +ENTRYPOINT ["/usr/bin/bazelisk"] diff --git a/cloudbuild.yaml b/cloudbuild.yaml index 4234c7c55..4ed07a3ad 100644 --- a/cloudbuild.yaml +++ b/cloudbuild.yaml @@ -24,7 +24,7 @@ steps: - name: 'golang:1.23.0' # check the integrity of the vendor directory args: ['scripts/verify-vendor.sh'] - - name: 'gcr.io/cloud-builders/bazel:7.3.2' + - name: 'gcr.io/cel-analysis/cel-go-bazelisk:latest' entrypoint: bazel args: - 'test' diff --git a/conformance/conformance_test.bzl b/conformance/conformance_test.bzl index b66686b45..019ae8701 100644 --- a/conformance/conformance_test.bzl +++ b/conformance/conformance_test.bzl @@ -38,7 +38,7 @@ def _expand_tests_to_skip(tests_to_skip): def _conformance_test_args(data, skip_tests, dashboard): args = [] args.append("--skip_tests={}".format(",".join(_expand_tests_to_skip(skip_tests)))) - args.append("--tests={}".format(",".join(["$(location " + test + ")" for test in data]))) + args.append("--tests={}".format(",".join(["$(rlocationpath " + test + ")" for test in data]))) if dashboard: args.append("--dashboard") return args