Migrate grafyaml container images to quay.io

This migrates the published container images to quay.io. We also update
the source of the python base image to quay.io.

Three tox.ini changes are made. The first is to stop skipping sdists
which skips all installation of the software entirely. This prevents
AUTHORS file generation which breaks the docs build. We also need to
stop using develop installs to ensure AUTHORS files get generated.
Third we replace the setup.py build_sphinx command with sphinx-build as
setup.py commands are deprecated and don't work properly with modern
setuptools.

Depends-On: https://review.opendev.org/c/opendev/system-config/+/881932
Change-Id: Ia738ee9553368464dc498e4e04e1389c6dfbb969
This commit is contained in:
Clark Boylan 2023-05-05 16:10:07 -07:00
parent ddd1845d00
commit 757e2d24c8
3 changed files with 34 additions and 27 deletions

View File

@ -1,22 +1,24 @@
- secret:
name: grafyaml-dockerhub
name: grafyaml-opendev-quayio
data:
username: opendevzuul
password: !encrypted/pkcs1-oaep
- bbW9hdHj1GzhXJky9VkO/FKqiwWJDvaJGn+z/rB/i4ssGu8keRiFCEXHBzzioDe9OWlux
aFNz1T3x7cUlWMEQ0ZDvD7GeQ9dRSo3lWctoS0P4iMClmZKjMDI+TSuLdVg2GlH6CtMiH
b0Flw5j4BsP2VtbN71KOs+J8ybLVYivdAJmDGVST4gBBI1vL5RHIMr98BEx7oGqcB+h/1
FtRIWqCjWr+Jvj6C+rdGKiocb77sJyFfZ1X7H97o5TETQeYs118kBP0iWv5FksoflUQU0
cckE6u0oDrPx/4ea3pqKPLD9/B8/vAX+WUd1y2jUnmUmZvnEeTxekjXFUTrCVLqZc1FTC
ZbbL/CQc/25QOI7sEeUigcYkPINhs6OsEe36gE2fKIjWEdVdunNOMxeQ/RS86OttzGlcP
x+ADrUTQjkuEnxZo2WTYL4kHuzPr3//DsPjLJBq8hoKXlT3fpdH5pHaiVBC3oIVCWfzSa
1LfX7XL0eFIwEc99gAfbfhljE9P77ZWX2zD9reyNNH4VCI9u92RKF5+VZ5ResOdOA0z0r
sMYue1hqHYLLQq9O42t3PBfVMrS1V+GcJ8oWn+9sOll16kQw+wVpLmba/0Btdq0MSdWxc
itrO3WwA2kqDd6qtHYAd0c9BEx8HDt66Rl56AN30LBtPRTdhNc93QDDJlPvqZE=
quay.io:
username: opendevorg+opendevrobot
password: !encrypted/pkcs1-oaep
- hSTvQh0pD1SNTf5tCe+v5cgZFQKEsW1Ca/tYN7nk96AC95xqju9lckJvs+X7mPK4XX3wn
Cu2fAKY26Jt7HL1IQEtqXMnYARPoEXJbqbS5IPVdyzOil/PuQBVShFOMbXAOYMzJm5JNN
0i7c9q2+4bv7YsVEIOZjhL5Mykhfk+nBPasubVOP390js12t0kBlm4TBTRCimf/YzetpK
uoA2TBVai2aqSGBSvzXBPQb3D+l/EH1LsCY7irAv+pMr3k33x6u6I+3ejC2z33O9bv8us
OsToyWa98W9ZviJ8mIVAPr8G6NCfaVUY3Hoa60xRZSbIot4TlrDjK8gA4Blz6eBaS9Ho9
0YOOBlUmofGBREQM4mV8419aaaJwVo+pEmaehJMu+pDphNfzJD2UI61XLV0WoY1jWdbPn
/Y9xn54bVnzc7vO3s32ckDdrpQ0y7QsppHpuyiEOo0xdvkv9furOog/phzqFz1XWWHNra
co6NSqmTrKHJQBijn37F6PHLt+fukmP/2mFl/SYM9+ZTxtqgb3+BUHouZRTdkuDD/HZpO
7UBlM0S78ktwAlsACkb7C6erxT+jZ/7/ydq/3vAXTEh/jUCBbeDiciwcXxnxuPMKZK8AH
Cf18aChlq4BLqpcZYCAsIiXzEU55K/T4rPyg/d7NfIq9LiNSwNRCMTqq+zwHMY=
# No api token because grafyaml won't need to create new repos
- job:
name: grafyaml-build-image
parent: opendev-build-docker-image
parent: opendev-build-container-image
description: Build a Docker image of grafyaml
allowed-projects: opendev/grafyaml
timeout: 2700
@ -28,15 +30,22 @@
dependencies:
- opendev-buildset-registry
vars: &grafyaml_image_vars
docker_images:
promote_container_image_method: intermediate-registry
promote_container_image_job: grafyaml-upload-image
container_command: docker
container_images:
- context: .
repository: opendevorg/grafyaml
registry: quay.io
repository: quay.io/opendevorg/grafyaml
namespace: opendevorg
repo_shortname: grafyaml
repo_description: A grafana graph management tool.
tags:
&imagetag "{{ zuul.tag is defined | ternary([zuul.get('tag', '').split('.')[0], '.'.join(zuul.get('tag', '').split('.')[:2]), zuul.get('tag', '')], ['latest']) }}"
- job:
name: grafyaml-upload-image
parent: opendev-upload-docker-image
parent: opendev-upload-container-image
description: Build the grafyaml Docker image and upload to Docker Hub.
timeout: 3600
requires:
@ -45,18 +54,18 @@
provides: grafyaml-container-image
vars: *grafyaml_image_vars
secrets:
- name: docker_credentials
secret: grafyaml-dockerhub
- name: container_registry_credentials
secret: grafyaml-opendev-quayio
pass-to-parent: true
- job:
name: grafyaml-promote-image
parent: opendev-promote-docker-image
parent: opendev-promote-container-image
description: Promote previously uploaded Docker image.
vars: *grafyaml_image_vars
secrets:
- name: docker_credentials
secret: grafyaml-dockerhub
- name: container_registry_credentials
secret: grafyaml-opendev-quayio
pass-to-parent: true
- project:

View File

@ -14,12 +14,12 @@
# See the License for the specific language governing permissions and
# limitations under the License.
FROM docker.io/opendevorg/python-builder:3.10-bullseye as builder
FROM quay.io/opendevorg/python-builder:3.10-bullseye as builder
COPY . /tmp/src
RUN assemble
FROM docker.io/opendevorg/python-base:3.10-bullseye
FROM quay.io/opendevorg/python-base:3.10-bullseye
COPY --from=builder /output/ /output
RUN /output/install-from-bindep

View File

@ -1,11 +1,9 @@
[tox]
minversion = 3.1.1
envlist = docs,pep8,py35,py36,py37,py38
skipsdist = True
ignore_basepython_conflict = True
[testenv]
usedevelop = True
install_command = pip install -U {opts} {packages}
setenv =
VIRTUAL_ENV={envdir}
@ -26,7 +24,7 @@ commands =
coverage report
[testenv:docs]
commands = python setup.py build_sphinx
commands = sphinx-build -W -E -b html doc/source doc/build/html
[flake8]
# E123, E125 skipped as they are invalid PEP-8.