-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #22 from paulrbr-fl/fix-v1.10
Upgrade clever tools to latest version
- Loading branch information
Showing
4 changed files
with
35 additions
and
82 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,11 +30,15 @@ | |
tags: | ||
- skip_ansible_lint | ||
|
||
- name: Push to Clever-Cloud to trigger deployment | ||
command: "git push --force git+ssh://[email protected]/{{ clever_app }}.git HEAD:refs/heads/master" | ||
- name: Deploy to Clever-Cloud | ||
shell: "clever deploy --force" | ||
args: | ||
chdir: "{{ clever_app_root }}" | ||
register: clever_git_push | ||
environment: | ||
CONFIGURATION_FILE: "{{ clever_login_file }}" | ||
register: clever_deploy | ||
async: 900 # 15 minutes timeout | ||
poll: 30 | ||
ignore_errors: true | ||
tags: | ||
- skip_ansible_lint | ||
|
@@ -44,35 +48,39 @@ | |
args: | ||
chdir: "{{ clever_app_root }}" | ||
when: | ||
- clever_git_push is failed | ||
- clever_git_push.stderr is search("shallow update not allowed") | ||
- clever_deploy is failed | ||
- clever_deploy.stderr is defined | ||
- clever_deploy.stderr is search("Failed to read git object") | ||
tags: | ||
- skip_ansible_lint | ||
|
||
- name: Push to Clever-Cloud to trigger deployment | ||
command: "git push --force git+ssh://[email protected]/{{ clever_app }}.git HEAD:refs/heads/master" | ||
- name: Deploy to Clever-Cloud | ||
shell: "clever deploy --force" | ||
args: | ||
chdir: "{{ clever_app_root }}" | ||
when: clever_git_push is failed | ||
environment: | ||
CONFIGURATION_FILE: "{{ clever_login_file }}" | ||
when: clever_deploy is failed | ||
register: clever_deploy | ||
async: 900 # 15 minutes timeout | ||
poll: 30 | ||
ignore_errors: true | ||
tags: | ||
- skip_ansible_lint | ||
|
||
- name: Watch deployment status | ||
command: "clever-wait-deploy.sh" | ||
args: | ||
chdir: "{{ clever_app_root }}" | ||
async: 900 | ||
poll: 0 | ||
register: long_command | ||
environment: | ||
CONFIGURATION_FILE: "{{ clever_login_file }}" | ||
changed_when: False | ||
- name: Return deployment logs | ||
debug: | ||
var: clever_deploy.stdout | ||
when: clever_deploy.stdout is defined | ||
|
||
- name: Return deployment errors | ||
debug: | ||
var: clever_deploy.stderr | ||
when: | ||
- clever_deploy is failed | ||
- clever_deploy.stderr is defined | ||
|
||
# Waits up to 15 minutes | ||
- name: Wait for deployment completion | ||
async_status: | ||
jid: "{{ long_command.ansible_job_id }}" | ||
register: job_result | ||
until: job_result.finished | ||
delay: 30 | ||
retries: 30 | ||
- name: Fail on deployment errors | ||
fail: | ||
msg: "The clever deployment failed! Please check logs above." | ||
when: clever_deploy is failed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,4 +26,3 @@ | |
with_items: | ||
- clever-set-domain.sh | ||
- clever-set-drain.sh | ||
- clever-wait-deploy.sh |