Publish container images to quay.io

Change-Id: I176f16e0a4b17c45ca76e6521bebe3e22f8c2bbd
This commit is contained in:
James E. Blair 2023-04-21 10:10:36 -07:00
parent 8acf7c36ca
commit 5f349f83c4
3 changed files with 47 additions and 31 deletions

View File

@ -1,32 +1,48 @@
- secret: - secret:
name: zuul-storage-proxy-dockerhub name: zuul-storage-proxy-registry-credentials
data: data:
username: zuulzuul quay.io:
username: zuul-ci+opendevzuul
password: !encrypted/pkcs1-oaep password: !encrypted/pkcs1-oaep
- BkUxcXcPY0rzCPJfmwHcdILp9eSpi0m8JBR1LuFy+kzpeRUr+MQyaoMO8DigywiozoDg2 - f+MbgMldK5fRSiudArax0Kfh27tPhXMbwuOnlE3PguACmdiM1iojT5mTXicu4teZaB6w4
s/dfYZWdDlGKc3+fIYT3XBh7nckUeijz6m249mzqWSv7i2/j9iG2F/iyL6zKVf1bI2nQB 7nOr9E6sFG+EQq2JgUaCbUKW7CM5sogj/z/7/FWromZmRHBcL82KoEXF2jXB6TVh8QmhD
aYUeo4RkXed5wYIJcHhmS8s6W6zEd077TrdLJJwD9BlftDwdBZcQGM+Y88AACxleywY/w ww0MELKD2IoNEQ/Na2qY8vnF6urMmyxRkJlxhEXqMDGZKQLAzTA/psw4TaQ43M2XRtVs1
Uf+F3CKMr8BmjfPm0TPgq86bDMCizw6Hg8maWoTq6lV7c45juTTxXnEMjYwpB45h2ahwu KyzRIyIoV0QW4TkRLMpADA+zREJw0EQe621XRCEw5+z9dY60i+dim4FErpRoWMWcMmfHu
lv3ZhIHaWy7proiFPZ9q8QXHMPRZsCX2r/HO3pkCBagDcd2CQuNzLZhiQY/F6EJCgHetY W2kPu6dx+P4kxTeVHFZ1lcIzFAiVqFr4JwNjceCRgY4Aw/A6i3LNvmVnsWfjPgesFbZGQ
sLTP8j2FR17U7vrolJSCVrHG9AX6V3PCZfPN+tkHBRuxGwQeFweDJkBw4VBPU8U5tYTAH OTxrCZMnb//01uUuLO+bSPP3Ez1LMNAyNAKg0u5kOW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Lh3rHcrRmQXl9TbdM3TGRLAQIfDNMy4KDLUe7rIcgfvwxOgdSxOfxydSEb2oDU
ZUUa9IZry1ZMf2THdPR16wGvfdU3ek4nmT+/js8zrf7LFig5YW1pI5qMq5V2rh5RhRHGu
r4ceTYNwEYf7Tr3BfXa/S7VbdibLwkMlyGUzwgrBreDsiu36swNp7x8bqzdT44=
- job: - job:
name: zuul-storage-proxy-build-image name: zuul-storage-proxy-build-image
description: Build and test a Docker image. description: Build and test a container image.
parent: opendev-build-docker-image parent: opendev-build-container-image
allowed-projects: zuul/zuul-storage-proxy allowed-projects: zuul/zuul-storage-proxy
provides: zuul-storage-proxy-container-image provides: zuul-storage-proxy-container-image
run: &image_playbooks run: &image_playbooks
- playbooks/build.yaml - playbooks/build.yaml
- playbooks/test.yaml - playbooks/test.yaml
vars: &image_vars vars: &image_vars
docker_images: promote_container_image_method: intermediate-registry
promote_container_image_job: zuul-storage-proxy-upload-image
container_command: docker
container_images:
- context: . - context: .
repository: zuul/zuul-storage-proxy registry: quay.io
repository: quay.io/zuul-ci/zuul-storage-proxy
target: zuul-storage-proxy target: zuul-storage-proxy
tags: tags:
# If zuul.tag is defined: [ '3', '3.19', '3.19.0' ]. Only works for 3-component tags. # If zuul.tag is defined: [ '3', '3.19', '3.19.0' ]. Only works for 3-component tags.
@ -35,25 +51,25 @@
- job: - job:
name: zuul-storage-proxy-upload-image name: zuul-storage-proxy-upload-image
parent: opendev-upload-docker-image parent: opendev-upload-container-image
description: Build and test a Docker image and upload to Docker Hub. description: Build and test a container image.
allowed-projects: zuul/zuul-storage-proxy allowed-projects: zuul/zuul-storage-proxy
run: *image_playbooks run: *image_playbooks
secrets: secrets:
name: docker_credentials name: container_registry_credentials
secret: zuul-storage-proxy-dockerhub secret: zuul-storage-proxy-registry-credentials
pass-to-parent: true pass-to-parent: true
provides: zuul-storage-proxy-container-image provides: zuul-storage-proxy-container-image
vars: *image_vars vars: *image_vars
- job: - job:
name: zuul-storage-proxy-promote-image name: zuul-storage-proxy-promote-image
parent: opendev-promote-docker-image parent: opendev-promote-container-image
description: Promote previously uploaded Docker image. description: Promote previously uploaded container image.
allowed-projects: zuul/zuul-storage-proxy allowed-projects: zuul/zuul-storage-proxy
secrets: secrets:
name: docker_credentials name: container_registry_credentials
secret: zuul-storage-proxy-dockerhub secret: zuul-storage-proxy-registry-credentials
pass-to-parent: true pass-to-parent: true
nodeset: nodeset:
nodes: [] nodes: []
@ -80,11 +96,11 @@
release: release:
jobs: jobs:
- zuul-release-python - zuul-release-python
- upload-docker-image: - upload-container-image:
secrets: secrets:
name: docker_credentials name: container_registry_credentials
secret: zuul-storage-proxy-dockerhub secret: zuul-storage-proxy-registry-credentials
pass-to-parent: true pass-to-parent: true
vars: vars:
<<: *image_vars <<: *image_vars
upload_docker_image_promote: false upload_container_image_promote: false

View File

@ -1,6 +1,6 @@
- hosts: all - hosts: all
roles: roles:
- build-docker-image - build-container-image
# If buildset_registry is defined, that means a parent job is running it; # If buildset_registry is defined, that means a parent job is running it;
# only if it is not defined does it mean that we are running it. If we # only if it is not defined does it mean that we are running it. If we

View File

@ -1,7 +1,7 @@
- hosts: all - hosts: all
vars: vars:
content: "Hello world!" content: "Hello world!"
proxy_image: docker.io/zuul/zuul-storage-proxy:latest proxy_image: quay.io/zuul-ci/zuul-storage-proxy:latest
tasks: tasks:
- name: Create clouds.yaml - name: Create clouds.yaml
tempfile: tempfile: