monasca-notification/playbooks/docker-publish.yml
Adrian Czarnecki 5104c9ebac Fix zuul publish docker image job
Add tag to docker push command with specific branch name

Change-Id: I9c408f2198a017391decba04008f2d3bfec6525e
2021-02-24 12:03:34 +00:00

13 lines
473 B
YAML

---
- hosts: all
tasks:
- name: Login to Dockerhub
command: "docker login -u {{ doker_hub_login_notification.user }} -p {{ doker_hub_login_notification.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/notification:{{ zuul.tag if zuul.pipeline == 'release' else 'master'}}"