
Add tag to docker push command with specific branch name Change-Id: Ie4b135c456333cd8a98cfb1d5231351786d1dd86
13 lines
440 B
YAML
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'}}"
|