Skip to content

Commit dff6b4c

Browse files
authored
Update Bazel to 6.3.2 (#225)
Also minor improvements to the integration test image. The size is reduced from 4.17G to 4.05G.
1 parent 1b29414 commit dff6b4c

File tree

4 files changed

+16
-12
lines changed

4 files changed

+16
-12
lines changed

.github/ci/Dockerfile.integration-test-image

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,22 +9,25 @@ RUN \
99
curl -fsSL https://bazel.build/bazel-release.pub.gpg | gpg --dearmor >bazel-archive-keyring.gpg && \
1010
mv bazel-archive-keyring.gpg /usr/share/keyrings && \
1111
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/bazel-archive-keyring.gpg] https://storage.googleapis.com/bazel-apt stable jdk1.8" | tee /etc/apt/sources.list.d/bazel.list && \
12-
1312
apt-get update && \
1413
apt-get install -y \
15-
bazel-6.2.0 \
14+
bazel-6.3.2 \
1615
git \
1716
jq && \
1817
apt-get clean && \
1918
rm -rf /var/lib/apt/lists/* && \
19+
ln -s /usr/bin/bazel-6.3.2 /usr/bin/bazel
2020

21-
ln -s /usr/bin/bazel-6.2.0 /usr/bin/bazel && \
22-
# Unpack Bazel for future use.
23-
bazel version
21+
RUN mkdir -p /builder /output /workspace && chmod -R 777 /output
2422

2523
# rules_python is not happy if bazel runs as root so create a new user
2624
# https://github.com/bazelbuild/rules_python/pull/713
2725
# https://github.com/GoogleCloudPlatform/cloud-builders/issues/641
28-
RUN mkdir -p /builder /output /workspace && chmod -R 777 /output
2926
RUN adduser builder
27+
28+
# Allow running sudo without password
29+
RUN apt-get update && apt-get install -y sudo && apt-get clean && rm -rf /var/lib/apt/lists/* && \
30+
usermod -aG sudo builder && \
31+
echo "builder ALL=(ALL) NOPASSWD:ALL" > "/etc/sudoers.d/builder" && chmod 440 "/etc/sudoers.d/builder"
32+
3033
USER builder

.github/ci/integration_test_cloudbuild.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ steps:
1212

1313
# This runs on a custom image that has kubectl, gcloud and bazel installed.
1414
# See Dockerfile.integration-test-image.
15-
- name: "gcr.io/robco-integration-test/integration-test-image@sha256:928573eb6eae7033efd0d62bda58a0e94c4142a3c319eded4a32940c6776a556"
15+
- name: "gcr.io/robco-integration-test/integration-test-image@sha256:4861a46d7079ffa53d54999a3df080cb4a919505bb2b4803416ff5fad13efb5f"
1616
entrypoint: "bash"
1717
args: ["./.github/ci/integration_test.sh"]
1818
env:

.github/workflows/check-bazel.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ on:
99
permissions:
1010
contents: read
1111

12+
env:
13+
USE_BAZEL_VERSION: "6.3.2"
14+
1215
jobs:
1316
check-bazel:
1417
runs-on: ubuntu-20.04
@@ -31,8 +34,6 @@ jobs:
3134
fi
3235
echo "$ROBCO_INTEGRATION_TEST_GITHUB_ROBOT_JSON_KEY" > robco_integration_test_credentials.json
3336
- name: Run .github/ci/presubmit.sh
34-
env:
35-
USE_BAZEL_VERSION: "6.2.0"
3637
run: ./.github/ci/presubmit.sh
3738
- name: Get bazel server logs
3839
if: success() || failure()

.github/workflows/release.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ concurrency:
1616
group: ${{ github.ref }}
1717
cancel-in-progress: true
1818

19+
env:
20+
USE_BAZEL_VERSION: "6.3.2"
21+
1922
jobs:
2023
create_release:
2124
runs-on: ubuntu-20.04
@@ -48,8 +51,6 @@ jobs:
4851
echo $ROBCO_NAVTEST_GITHUB_ROBOT_JSON_KEY > robco_navtest_credentials.json
4952
5053
- name: Deploy Navtest
51-
env:
52-
USE_BAZEL_VERSION: "6.2.0"
5354
run: |
5455
set -euo pipefail
5556
@@ -67,7 +68,6 @@ jobs:
6768
# Now we are ready to create the release.
6869
- name: Run release_binary.sh
6970
env:
70-
USE_BAZEL_VERSION: "6.2.0"
7171
REPO: ${{ github.repository }}
7272
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7373
FULL_SHA: ${{ steps.latest-green.outputs.latest_green }}

0 commit comments

Comments
 (0)