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

View File

@ -14,12 +14,12 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # 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 COPY . /tmp/src
RUN assemble 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 COPY --from=builder /output/ /output
RUN /output/install-from-bindep RUN /output/install-from-bindep

View File

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