python-monascaclient/playbooks/docker-publish.yml
Martin Chacon Piza cf4d9cc470 Fix zuul publish docker image job
Add tag to docker push command with specific branch name

Change-Id: I878f30ccdbd4244ec49c551ee24acd5426dfb6c9
2021-04-07 14:13:49 +02:00

13 lines
455 B
YAML

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