diff options
-rw-r--r-- | files/clever-wait-deploy.sh | 2 | ||||
-rw-r--r-- | tasks/deploy.yml | 14 |
2 files changed, 14 insertions, 2 deletions
diff --git a/files/clever-wait-deploy.sh b/files/clever-wait-deploy.sh index 99088cc..c955f6a 100644 --- a/files/clever-wait-deploy.sh +++ b/files/clever-wait-deploy.sh | |||
@@ -32,7 +32,7 @@ function check { | |||
32 | done | 32 | done |
33 | 33 | ||
34 | # Wait for completion | 34 | # Wait for completion |
35 | echo "Deployement in progress..." | 35 | echo "Deployment in progress..." |
36 | while deploying "$commit" -a $timeout -gt 0 | 36 | while deploying "$commit" -a $timeout -gt 0 |
37 | do | 37 | do |
38 | sleep $samplingTime | 38 | sleep $samplingTime |
diff --git a/tasks/deploy.yml b/tasks/deploy.yml index 8b98d8c..54c04ac 100644 --- a/tasks/deploy.yml +++ b/tasks/deploy.yml | |||
@@ -24,7 +24,19 @@ | |||
24 | - name: Push to Clever-Cloud to trigger deployment | 24 | - name: Push to Clever-Cloud to trigger deployment |
25 | command: "git push --force git+ssh://git@push-par-clevercloud-customers.services.clever-cloud.com/{{ clever_app }}.git HEAD:refs/heads/master" | 25 | command: "git push --force git+ssh://git@push-par-clevercloud-customers.services.clever-cloud.com/{{ clever_app }}.git HEAD:refs/heads/master" |
26 | 26 | ||
27 | - name: Wait until deployment completion | 27 | - name: Watch deployment status |
28 | command: clever-wait-deploy.sh | 28 | command: clever-wait-deploy.sh |
29 | async: 900 | ||
30 | poll: 0 | ||
31 | register: long_command | ||
29 | environment: | 32 | environment: |
30 | CONFIGURATION_FILE: "{{ clever_login_file }}" | 33 | CONFIGURATION_FILE: "{{ clever_login_file }}" |
34 | |||
35 | # Waits up to 15 minutes | ||
36 | - name: Wait for deployment completion | ||
37 | async_status: | ||
38 | jid: "{{ long_command.ansible_job_id }}" | ||
39 | register: job_result | ||
40 | until: job_result.finished | ||
41 | delay: 30 | ||
42 | retries: 30 | ||