Add upload-docker-image release job

This will allow us to publish container images to docker when we git
tag. Also add tags field to image_vars, like we do for zuul and nodepool
images.

Change-Id: I9d4cde7a15c6bc57de62ebe3dcafe209e147aefc
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
This commit is contained in:
Paul Belanger 2020-11-19 12:47:10 -05:00
parent 20de79e8d2
commit ea4b756f70

View File

@ -28,6 +28,10 @@
- context: .
repository: zuul/zuul-registry
target: zuul-registry
tags:
# If zuul.tag is defined: [ '3', '3.19', '3.19.0' ]. Only works for 3-component tags.
# Otherwise: ['latest']
&imagetag "{{ zuul.tag is defined | ternary([zuul.get('tag', '').split('.')[0], '.'.join(zuul.get('tag', '').split('.')[:2]), zuul.get('tag', '')], ['latest']) }}"
- job:
name: zuul-registry-upload-image
@ -80,3 +84,11 @@
release:
jobs:
- opendev-release-python
- upload-docker-image:
secrets:
name: docker_credentials
secret: zuul-registry-dockerhub
pass-to-parent: true
vars:
<<: *image_vars
upload_docker_image_promote: false