diff --git a/.zuul.yaml b/.zuul.yaml new file mode 100644 index 0000000..ce77966 --- /dev/null +++ b/.zuul.yaml @@ -0,0 +1,59 @@ +- secret: + name: statusbot-opendev-dockerhub + data: + username: opendevzuul + password: !encrypted/pkcs1-oaep + - iNW5LmF+l127d5Tsbku/SoFSHv4+f5Y6GBKHRbdODzR2hNt+ZhEOGvJxRIg+majHdX+Qs + 2ds7KISBocOYc1W20ro5w2R6leNMlSaS8N/9zsA0vhEVXoc3vaCe3EC1/fdmcQZYPkjnY + HNwh+5WqYC5zwAiimyNwp6f3amHYs/TyrgRagzbCJe1cSIkuXbW9U4gT1tOBDxOFh9GzN + PnnaiXmEhuN3X3a39dn1+HhDdNcY0xGNkzXDkemqQznlV/zx1AssEhjBfzFGZll55J/jW + REdURvim8/8F16sK5XMFRBuIw3a9PARt70pIlrwMAwPwpzrFCHOVCyyw0+Zlm0DzppcXc + dxlX0ZBPdQLPaWw3qN5Hz1mxH6fr2o4muMFASuFXGXpbdiGKBbHOOKX7V7tfr62JXVcKG + bglaRXrl3nMiMsroEuqIOXYxfpvDbuWlX8vbkdI6bhunkA81tdjytSTOCU7fXeucAeVtp + MpqPwuSGvUcU+DIbOTSP+EVHq7/096ERzEuGx1h3SI05HojDaYRop7GYuCoFO7KkxNt+5 + X4zziFreoJn5ixwr+/8rqlpXmylbKknKBolZAiBVGsGF5cKW3LGoMr9NPIc2MjEqnJzz2 + Y9BD/RSAX1HMiPdzSEKefNUYqG8lEsWGQoSisyAw357laBYYJ1q/m0nxAFqqWU= + +- job: + name: statusbot-build-opendev-image + parent: opendev-build-docker-image + description: Build OpenDev Docker images for statusbot + provides: statusbot-container-image + vars: &statusbot_opendev_image_vars + zuul_work_dir: src/opendev.org/opendev/statusbot + docker_images: + - context: . + repository: opendevorg/statusbot + target: statusbot + +- job: + name: statusbot-upload-opendev-image + parent: opendev-upload-docker-image + description: Build OpenDev statusbot Docker images and upload to Docker Hub. + provides: statusbot-container-image + vars: *statusbot_opendev_image_vars + secrets: + - name: docker_credentials + secret: statusbot-opendev-dockerhub + pass-to-parent: true + +- job: + name: statusbot-promote-opendev-image + parent: opendev-promote-docker-image + description: Promote previously uploaded statusbot Docker images. + vars: *statusbot_opendev_image_vars + secrets: + - name: docker_credentials + secret: statusbot-opendev-dockerhub + pass-to-parent: true + +- project: + check: + jobs: + - statusbot-build-opendev-image + gate: + jobs: + - statusbot-upload-opendev-image + promote: + jobs: + - statusbot-promote-opendev-image diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..c52adad --- /dev/null +++ b/Dockerfile @@ -0,0 +1,26 @@ +# Copyright 2021 Red Hat, Inc. +# +# This module is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This software is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this software. If not, see . + +FROM opendevorg/python-builder:3.8 as builder + +COPY . /tmp/src +RUN assemble + +FROM opendevorg/python-base:3.8 as statusbot + +COPY --from=builder /output/ /output +RUN /output/install-from-bindep + +CMD ["/usr/local/bin/statusbot", "-d", "/etc/statusbot/statusbot.config"] diff --git a/setup.cfg b/setup.cfg index afc1009..1f1152c 100644 --- a/setup.cfg +++ b/setup.cfg @@ -14,6 +14,9 @@ classifier = Programming Language :: Python Programming Language :: Python :: 3 Programming Language :: Python :: 3.5 + Programming Language :: Python :: 3.6 + Programming Language :: Python :: 3.7 + Programming Language :: Python :: 3.8 [entry_points] console_scripts =