Skip to content

Commit

Permalink
Fix for pushing cahcer image on timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
oblodgett committed Apr 8, 2020
1 parent 8030d16 commit 700cc98
Showing 1 changed file with 5 additions and 18 deletions.
23 changes: 5 additions & 18 deletions tasks/push_cacher_image.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

- name: Stop Cacher
docker_container:
name: "{{ INFINISPAN_SERVER_NAME }}"
Expand All @@ -8,22 +7,10 @@
command: docker commit "{{ INFINISPAN_SERVER_NAME }}" "{{ CACHER_RELEASE_IMAGE_NAME }}"

- name: Push Container To Docker Hub
docker_image:
name: "{{ CACHER_RELEASE_IMAGE_NAME }}"
push: yes
timeout: 300
register: push_result
until: push_result is success
retries: 10
delay: 2
command: docker push "{{ CACHER_RELEASE_IMAGE_NAME }}"

- name: Add Tag to Repository from name
docker_image:
name: "{{ CACHER_RELEASE_IMAGE_NAME }}"
repository: "{{ CACHER_NETWORK_IMAGE_NAME }}"
push: yes
timeout: 300
register: push_result
until: push_result is success
retries: 10
delay: 2
command: docker tag "{{ CACHER_RELEASE_IMAGE_NAME }}" "{{ CACHER_NETWORK_IMAGE_NAME }}"

- name: Push Net Container To Docker Hub
command: docker push "{{ CACHER_NETWORK_IMAGE_NAME }}"

0 comments on commit 700cc98

Please sign in to comment.