
Upload an image to dockerhub with a change-specific tag in every gate job, and then, if the change lands, re-tag the image in dockerhub. Change-Id: Ie57fc342cbe29d261d33845829b77a0c1bae5ff4
12 lines
408 B
YAML
12 lines
408 B
YAML
- hosts: all
|
|
tasks:
|
|
- name: Upload image to dockerhub
|
|
when: credentials is defined
|
|
block:
|
|
- name: Log in to dockerhub
|
|
command: "docker login -u {{ credentials.username }} -p {{ credentials.password }}"
|
|
no_log: true
|
|
- name: Upload to dockerhub
|
|
command: "docker push {{ item.repository }}:change_{{ zuul.change }}"
|
|
loop: "{{ images }}"
|