summaryrefslogtreecommitdiff
path: root/.zuul.yaml
diff options
context:
space:
mode:
authorJames E. Blair <jeblair@redhat.com>2020-06-10 11:20:21 -0700
committerJames E. Blair <jeblair@redhat.com>2020-06-10 11:31:12 -0700
commit856f038ff8a96845194b17c9b27a050d498cb240 (patch)
treef40ce6e1d74f47dbc2d03a9dba2ecb8be2ea8cb5 /.zuul.yaml
parentf6e4d30ea10fcce89b16644e3e7f4d0655504099 (diff)
downloadzuul-856f038ff8a96845194b17c9b27a050d498cb240.tar.gz
Run upload-docker-image on release
When we tag a release of Zuul, run the upload-docker-image job, but tell it to do so in a non-promote mode. This will cause it to directly upload the images to Docker Hub with the final tags applied. We want to do this in the release pipeline so that we get images built with the correct version number based on the git tag. When run in a pipeline with a tag attribute set, this will use all three lengths of the version number (3.19.0, 3.19, 3) as tags instead of the single 'latest' tag which is what is applied in the promote pipeline. This temporarily comments out the other release jobs so that we can manually enqueue the most recent tag and retroactively build and publish it to Docker Hub. Once this works, we will re-enable those two jobs. Change-Id: If3bdbe4fac7e8ebf8b2bb087b578df7f860cbea4 Depends-On: https://review.opendev.org/734890
Diffstat (limited to '.zuul.yaml')
-rw-r--r--.zuul.yaml21
1 files changed, 19 insertions, 2 deletions
diff --git a/.zuul.yaml b/.zuul.yaml
index e7039bd37..da20724a2 100644
--- a/.zuul.yaml
+++ b/.zuul.yaml
@@ -139,21 +139,30 @@
- context: .
repository: zuul/zuul
target: zuul
+ 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']) }}"
- context: .
repository: zuul/zuul-executor
target: zuul-executor
+ tags: *imagetag
- context: .
repository: zuul/zuul-fingergw
target: zuul-fingergw
+ tags: *imagetag
- context: .
repository: zuul/zuul-merger
target: zuul-merger
+ tags: *imagetag
- context: .
repository: zuul/zuul-scheduler
target: zuul-scheduler
+ tags: *imagetag
- context: .
repository: zuul/zuul-web
target: zuul-web
+ tags: *imagetag
- job:
name: zuul-upload-image
@@ -311,5 +320,13 @@
download_artifact_job: zuul-build-dashboard
release:
jobs:
- - zuul-release-python
- - zuul-publish-tox-docs
+ # - zuul-release-python
+ # - zuul-publish-tox-docs
+ - upload-docker-image:
+ secrets:
+ name: docker_credentials
+ secret: zuul-dockerhub
+ pass-to-parent: true
+ vars:
+ <<: *zuul_image_vars
+ upload_docker_image_promote: false