From 0366b867bf98d357c02e835573a862ddd9491d2e Mon Sep 17 00:00:00 2001 From: "James E. Blair" Date: Fri, 9 Apr 2021 16:16:40 -0700 Subject: [PATCH] Upload release images on tag This uploads release images to dockerhub when we tag the repo. Change-Id: Ic44a9d29a1e888d8d7874205b0025f286912b5e8 --- .zuul.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.zuul.yaml b/.zuul.yaml index 80a3dcb..c2e6cce 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -39,6 +39,10 @@ - context: . dockerfile: build/Dockerfile repository: zuul/zuul-operator + tags: + # If zuul.tag is defined: [ '3', '3.19', '3.19.0' ]. Only works for 3-component tags. + # Otherwise: ['latest'] + "{{ zuul.tag is defined | ternary([zuul.get('tag', '').split('.')[0], '.'.join(zuul.get('tag', '').split('.')[:2]), zuul.get('tag', '')], ['latest']) }}" - secret: name: zuul-operator-dockerhub @@ -100,3 +104,9 @@ promote: jobs: - zuul-operator-promote-image + release: + jobs: + - zuul-operator-upload-image: + vars: + <<: *image_vars + upload_docker_image_promote: false