diff options
author | Clement Delafargue <clement.delafargue@fretlink.com> | 2020-06-24 11:34:28 +0200 |
---|---|---|
committer | Clement Delafargue <clement.delafargue@fretlink.com> | 2020-06-30 15:31:19 +0200 |
commit | facc275a703d3bccc320e5577eb3d050f99dff0e (patch) | |
tree | 0f7aaa15f07c446b00484fa54bd98d2bb5c648c2 /tasks | |
parent | 44e55b1d81f5defe28249d6b70b894c1ebad7c91 (diff) | |
download | ansible-clever-facc275a703d3bccc320e5577eb3d050f99dff0e.tar.gz ansible-clever-facc275a703d3bccc320e5577eb3d050f99dff0e.tar.zst ansible-clever-facc275a703d3bccc320e5577eb3d050f99dff0e.zip |
Don't run `clever deploy` if the app is up-to-date
Running `git push` when the remote is up-to-date
no-ops (it does not trigger a deployment, but it does not fail either).
Running `clever deploy` when the remote is up-to-date triggers a failure. Here, we care about the _end result_ (ie the app is deployed on the correct commit), so no-oping is more appropriate.
This behaviour is not baked in `clever-tools`, but I think it should. I opened an issue. This script
is a temporary workaround. (at least I hope it's temporary)
https://github.com/CleverCloud/clever-tools/issues/422
Diffstat (limited to 'tasks')
-rw-r--r-- | tasks/deploy.yml | 2 | ||||
-rw-r--r-- | tasks/setup.yml | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/tasks/deploy.yml b/tasks/deploy.yml index f9d8408..ae11921 100644 --- a/tasks/deploy.yml +++ b/tasks/deploy.yml | |||
@@ -47,7 +47,7 @@ | |||
47 | changed_when: false | 47 | changed_when: false |
48 | 48 | ||
49 | - name: Deploy to Clever-Cloud | 49 | - name: Deploy to Clever-Cloud |
50 | shell: "clever deploy --force" | 50 | command: "{{ ansible_env.HOME }}/{{ clever_user_path }}/clever-deploy.sh" |
51 | args: | 51 | args: |
52 | chdir: "{{ clever_app_root }}" | 52 | chdir: "{{ clever_app_root }}" |
53 | environment: | 53 | environment: |
diff --git a/tasks/setup.yml b/tasks/setup.yml index 8a11772..89bc518 100644 --- a/tasks/setup.yml +++ b/tasks/setup.yml | |||
@@ -27,6 +27,7 @@ | |||
27 | dest: "{{ ansible_env.HOME }}/{{ clever_user_path }}/{{ item }}" | 27 | dest: "{{ ansible_env.HOME }}/{{ clever_user_path }}/{{ item }}" |
28 | mode: 0755 | 28 | mode: 0755 |
29 | with_items: | 29 | with_items: |
30 | - clever-deploy.sh | ||
30 | - clever-set-domain.sh | 31 | - clever-set-domain.sh |
31 | - clever-set-drain.sh | 32 | - clever-set-drain.sh |
32 | - clever-set-scalability.sh | 33 | - clever-set-scalability.sh |