diff --git a/.zuul.yaml b/.zuul.yaml index 061bf8c5bf..34d9e4e049 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -63,16 +63,45 @@ uploaded (it will be tagged with this in the local registry). + abstract: true + pre-run: playbooks/zuul/build-image/pre.yaml + run: playbooks/zuul/build-image/run.yaml + +- job: + name: system-config-upload-image + parent: system-config-build-image + description: | + Build and upload a docker image. + + .. zuul:jobvar:: images + + A list of images to build. Each item in the list should have: + + .. zuul:jobvar:: context + + The docker build context; should be a directory in this repo. + + .. zuul:jobvar:: target + + Optional; if supplied, the target for a multi-stage build. + + .. zuul:jobvar:: repository + + The name of the target repository in dockerhub for the + image. Supply this even if the image is not going to be + uploaded (it will be tagged with this in the local + registry). + .. zuul:jobvar:: credentials - If this is provided, the resulting image will be uploaded. This should be a secret with two keys: ``username`` and ``password``. abstract: true - pre-run: playbooks/zuul/build-image/pre.yaml - run: playbooks/zuul/build-image/run.yaml post-run: playbooks/zuul/build-image/upload.yaml + secrets: + name: credentials + secret: system-config-dockerhub - job: name: system-config-promote-image @@ -97,6 +126,9 @@ abstract: true run: playbooks/zuul/build-image/promote.yaml + secrets: + name: credentials + secret: system-config-dockerhub nodeset: nodes: [] @@ -104,8 +136,8 @@ name: system-config-build-image-gitea description: Build a gitea image parent: system-config-build-image - vars: - images: &gitea_images + vars: &gitea_vars + images: - context: docker/gitea target: gitea repository: opendevorg/gitea @@ -118,28 +150,23 @@ - job: name: system-config-upload-image-gitea description: Build and upload a gitea image - parent: system-config-build-image-gitea - secrets: - name: credentials - secret: system-config-dockerhub + parent: system-config-upload-image + vars: *gitea_vars + files: *gitea_files - job: name: system-config-promote-image-gitea description: Promote a previously published gitea image to latest parent: system-config-promote-image - secrets: - name: credentials - secret: system-config-dockerhub - vars: - images: *gitea_images + vars: *gitea_vars files: *gitea_files - job: name: system-config-build-image-jinja-init description: Build a jinja-init image parent: system-config-build-image - vars: - images: &jinja-init_images + vars: &jinja-init_vars + images: - context: docker/jinja-init target: jinja-init repository: opendevorg/jinja-init @@ -149,20 +176,15 @@ - job: name: system-config-upload-image-jinja-init description: Build and upload a jinja-init image - parent: system-config-build-image-jinja-init - secrets: - name: credentials - secret: system-config-dockerhub + parent: system-config-upload-image + vars: *jinja-init_vars + files: *jinja-init_files - job: name: system-config-promote-image-jinja-init description: Promote a previously published jinja-init image to latest parent: system-config-promote-image - secrets: - name: credentials - secret: system-config-dockerhub - vars: - images: *jinja-init_images + vars: *jinja-init_vars files: *jinja-init_files # Role integration jobs. These test the top-level generic roles/* @@ -448,6 +470,7 @@ - system-config-run-nodepool - system-config-run-docker - system-config-build-image-gitea + - system-config-build-image-jinja-init gate: jobs: - tox-linters diff --git a/docker/gitea/Dockerfile b/docker/gitea/Dockerfile index b3782d7d83..4a48bedec6 100644 --- a/docker/gitea/Dockerfile +++ b/docker/gitea/Dockerfile @@ -112,4 +112,4 @@ EXPOSE 22 VOLUME ["/data"] ENTRYPOINT ["/usr/bin/entrypoint"] CMD ["/usr/sbin/sshd", "-D"] -# this comment is here to perform a test run of the job. +# this comment is here to perform a test run of the job.. diff --git a/docker/jinja-init/Dockerfile b/docker/jinja-init/Dockerfile index 5c4a6b16a9..a06587e262 100644 --- a/docker/jinja-init/Dockerfile +++ b/docker/jinja-init/Dockerfile @@ -32,3 +32,4 @@ RUN pip install jinja2 COPY --from=build /src/jinja-init/run.py / ENTRYPOINT ["python", "/run.py"] +# this comment is here to perform a test run of the job.