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

Change-Id: Ie4b135c456333cd8a98cfb1d5231351786d1dd86
2021-02-24 11:48:20 +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 'master'}}"