monasca-thresh/playbooks/docker-publish.yml
Martin Chacon Piza bcb469e8dc Fix zuul publish docker image job
Add tag to docker push command with specific branch name

Change-Id: If51a4e21476750faac7401e57dbd1e03e37a2fd8
2021-02-16 17:55:36 +01:00

13 lines
457 B
YAML

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