From ea4b756f70a41e51c7dc0aed7f17df31da461c91 Mon Sep 17 00:00:00 2001 From: Paul Belanger Date: Thu, 19 Nov 2020 12:47:10 -0500 Subject: [PATCH] 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 --- .zuul.yaml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.zuul.yaml b/.zuul.yaml index 760e321..9620ac9 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -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