diff options
author | Paul Bonaud <paul.bonaud@fretlink.com> | 2020-06-17 11:06:08 +0200 |
---|---|---|
committer | Paul Bonaud <paul.bonaud@fretlink.com> | 2020-06-17 12:43:56 +0200 |
commit | 7ceb5d83f04daeb81fb07814a48dd61aca41430f (patch) | |
tree | 2b838e43037a85f90d9db176db8f31e7841ecfca /tasks/redeploy.yml | |
parent | ac9ad8d780ae4c8f31b69b986b4c295e11cbfa13 (diff) | |
download | ansible-clever-upgrade-clever-cli.tar.gz ansible-clever-upgrade-clever-cli.tar.zst ansible-clever-upgrade-clever-cli.zip |
deploy: remove custom polling script now that the CLI does it for usupgrade-clever-cli
See recent changes (https://github.com/CleverCloud/clever-tools/pull/415)
introduced in 2.5.0+ version of the clever cli tools
Diffstat (limited to 'tasks/redeploy.yml')
-rw-r--r-- | tasks/redeploy.yml | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/tasks/redeploy.yml b/tasks/redeploy.yml new file mode 100644 index 0000000..41c0a5c --- /dev/null +++ b/tasks/redeploy.yml | |||
@@ -0,0 +1,33 @@ | |||
1 | --- | ||
2 | ################################################################## | ||
3 | # Re-deploy only if its the first clever deploy for that project # | ||
4 | ################################################################## | ||
5 | |||
6 | - name: First time push to Clever-Cloud needs a full git clone | ||
7 | command: "git fetch --unshallow" | ||
8 | args: | ||
9 | chdir: "{{ clever_app_root }}" | ||
10 | tags: | ||
11 | - skip_ansible_lint | ||
12 | |||
13 | - name: Deploy to Clever-Cloud | ||
14 | shell: "clever deploy --force" | ||
15 | args: | ||
16 | chdir: "{{ clever_app_root }}" | ||
17 | environment: | ||
18 | CONFIGURATION_FILE: "{{ clever_login_file }}" | ||
19 | async: 2400 # 40 minutes | ||
20 | poll: 0 | ||
21 | ignore_errors: true | ||
22 | register: clever_deploy | ||
23 | tags: | ||
24 | - skip_ansible_lint | ||
25 | |||
26 | - name: Wait 40 minutes for deployment completion | ||
27 | async_status: | ||
28 | jid: "{{ clever_deploy.ansible_job_id }}" | ||
29 | register: job_result | ||
30 | until: job_result.finished | ||
31 | ignore_errors: true | ||
32 | delay: 30 | ||
33 | retries: 80 # 40 minutes (80 * 30 secs delay) | ||