From 072fcca06fc2a4a4181b53c513667c8cb5d62acd Mon Sep 17 00:00:00 2001 From: Monty Taylor Date: Mon, 16 Sep 2019 20:23:22 +0200 Subject: [PATCH] Fix files matcher and bazel for gerrit base image Use latest bazel It seems 0.27 is now too old. This is what happens when I go on vacation apparently. Add in a hack to override the bazelversion. We'll remove this once https://gerrit-review.googlesource.com/c/gerrit/+/237495 lands and has been merged up. Change-Id: Ib7a6d33ce8bf8498fd5cd09b25087dc09acb8df4 --- .zuul.yaml | 2 +- docker/bazel/Dockerfile | 2 +- docker/gerrit/base/Dockerfile | 2 +- playbooks/zuul/gerrit/repos.yaml | 7 +++++++ 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/.zuul.yaml b/.zuul.yaml index 2d36667458..8db79bd262 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -463,7 +463,7 @@ - context: docker/gerrit/base repository: opendevorg/gerrit-base files: &gerrit-base_files - - docker/gerrit-base/.* + - docker/gerrit/base/.* - job: name: system-config-upload-image-gerrit-base diff --git a/docker/bazel/Dockerfile b/docker/bazel/Dockerfile index 68c94d2b2d..bdfa39fdc8 100644 --- a/docker/bazel/Dockerfile +++ b/docker/bazel/Dockerfile @@ -13,7 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM l.gcr.io/google/bazel:0.27.1 as bazel +FROM l.gcr.io/google/bazel:0.29.1 as bazel # The bazel image comes with bazel only runnable by root for some weird reason. # The bower build in gerrit does not work as root. diff --git a/docker/gerrit/base/Dockerfile b/docker/gerrit/base/Dockerfile index d0b9905299..51a545ce77 100644 --- a/docker/gerrit/base/Dockerfile +++ b/docker/gerrit/base/Dockerfile @@ -20,7 +20,7 @@ RUN apt-get update \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* -# 3000 is what the existing opendev gerrit2 user is +# 3000 is what the existing opendev gerrit2 uid is RUN addgroup gerrit --gid 3000 --system \ && adduser \ --system \ diff --git a/playbooks/zuul/gerrit/repos.yaml b/playbooks/zuul/gerrit/repos.yaml index d8b1970314..5e1982ab82 100644 --- a/playbooks/zuul/gerrit/repos.yaml +++ b/playbooks/zuul/gerrit/repos.yaml @@ -1,5 +1,6 @@ - hosts: all tasks: + - name: Move plugin repos into gerrit tree command: "mv -f {{ item }} ../gerrit/plugins" args: @@ -52,3 +53,9 @@ command: "mv docker/gerrit/bazel/build-gerrit.sh /home/zuul/src/gerrit.googlesource.com/gerrit" args: chdir: /home/zuul/src/opendev.org/opendev/system-config + + # TODO(mordred) Remove this line when + # https://gerrit-review.googlesource.com/c/gerrit/+/237495 + # lands. + - name: Overwrite bazel version + shell: "echo 0.29.1 > /home/zuul/src/gerrit.googlesource.com/gerrit/.bazelversion"