Martin Chacon Piza b4aa7f1b08 Fix zuul publish docker image job
Add tag to docker push command with specific branch name

Change-Id: I9100912457dffcb0441d5e20a18074c4da8bff26
2021-02-24 12:01:08 +01:00

13 lines
440 B
YAML

---
- hosts: all
tasks:
- name: Login to Dockerhub
command: "docker login -u {{ doker_hub_login.user }} -p {{ doker_hub_login.password }}"
no_log: true
- name: List images
shell: "docker images --format '{% raw %}{{ .Repository }}:{{ .Tag }}{% endraw %}' | grep monasca"
- name: Push to Docker Hub all tags
shell: "docker push monasca/base:{{ zuul.tag if zuul.pipeline == 'release' else 'ussuri'}}"