diff --git a/.zuul.yaml b/.zuul.yaml index 8db79bd262..e0c1163132 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -458,10 +458,13 @@ name: system-config-build-image-gerrit-base description: Build a gerrit-base image. parent: system-config-build-image + required-projects: &gerrit_base_projects + - opendev/jeepyb vars: &gerrit-base_vars docker_images: - context: docker/gerrit/base repository: opendevorg/gerrit-base + path: /home/zuul/src/opendev.org/opendev/jeepyb files: &gerrit-base_files - docker/gerrit/base/.* @@ -469,6 +472,7 @@ name: system-config-upload-image-gerrit-base description: Build and upload a gerrit-base image. parent: system-config-upload-image + required-projects: *gerrit_base_projects vars: *gerrit-base_vars files: *gerrit-base_files @@ -476,6 +480,7 @@ name: system-config-promote-image-gerrit-base description: Promote a previously published gerrit-base image to latest. parent: system-config-promote-image + required-projects: *gerrit_base_projects vars: *gerrit-base_vars files: *gerrit-base_files @@ -982,7 +987,10 @@ - system-config-build-image-jinja-init - system-config-build-image-gitea-init - system-config-build-image-gitea - - system-config-build-image-gerrit-base + - system-config-build-image-gerrit-base: + dependencies: + - name: system-config-build-image-python-builder + soft: true - system-config-build-image-gerrit-2.13 - system-config-build-image-gerrit-2.15: dependencies: @@ -1030,7 +1038,10 @@ - system-config-upload-image-jinja-init - system-config-upload-image-gitea-init - system-config-upload-image-gitea - - system-config-upload-image-gerrit-base + - system-config-upload-image-gerrit-base: + dependencies: + - name: system-config-upload-image-python-builder + soft: true - system-config-upload-image-gerrit-2.13 - system-config-upload-image-gerrit-2.15: dependencies: @@ -1059,7 +1070,10 @@ - system-config-promote-image-jinja-init - system-config-promote-image-gitea-init - system-config-promote-image-gitea - - system-config-promote-image-gerrit-base + - system-config-promote-image-gerrit-base: + dependencies: + - name: system-config-promote-image-python-builder + soft: true - system-config-promote-image-gerrit-2.13 - system-config-promote-image-gerrit-2.15: dependencies: diff --git a/docker/gerrit/base/Dockerfile b/docker/gerrit/base/Dockerfile index cb0a7b67a3..acb4871da4 100644 --- a/docker/gerrit/base/Dockerfile +++ b/docker/gerrit/base/Dockerfile @@ -13,12 +13,23 @@ # See the License for the specific language governing permissions and # limitations under the License. +FROM opendevorg/python-builder as builder + +COPY . /tmp/src +RUN assemble + FROM openjdk:8 RUN apt-get update \ - && apt-get install -y dumb-init \ + && apt-get install -y dumb-init python3-launchpadlib \ && apt-get clean \ - && rm -rf /var/lib/apt/lists/* + && rm -rf /var/lib/apt/lists/* \ + && curl https://bootstrap.pypa.io/get-pip.py > /tmp/get-pip.py \ + && python3 /tmp/get-pip.py \ + && rm /tmp/get-pip.py + +COPY --from=builder /output/ /output +RUN /output/install-from-bindep # 3000 is what the existing opendev gerrit2 uid is RUN addgroup gerrit --gid 3000 --system \