diff options
author | paulrbr-fl <43074087+paulrbr-fl@users.noreply.github.com> | 2018-09-21 14:03:39 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-21 14:03:39 +0200 |
commit | da999d16b410b3b6892c4ffa692c1a860d1e2781 (patch) | |
tree | c24920fb02da129b3266c377994be0c0da9ac9ba | |
parent | d625a00570b54cd02f64ae6b11922ce9a7acaccf (diff) | |
parent | 19955c997637cef040850b3e2f175468f4e2799a (diff) | |
download | ansible-clever-1.3.tar.gz ansible-clever-1.3.tar.zst ansible-clever-1.3.zip |
Merge pull request #12 from paulrbr-fl/first-time-deployv1.3
deploy: Make sure repo is unshallow copy before pushing to clever
-rw-r--r-- | tasks/deploy.yml | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tasks/deploy.yml b/tasks/deploy.yml index 5e773b4..4b3f48b 100644 --- a/tasks/deploy.yml +++ b/tasks/deploy.yml | |||
@@ -26,6 +26,22 @@ | |||
26 | 26 | ||
27 | - name: Push to Clever-Cloud to trigger deployment | 27 | - name: Push to Clever-Cloud to trigger deployment |
28 | command: "git push --force git+ssh://git@push-par-clevercloud-customers.services.clever-cloud.com/{{ clever_app }}.git HEAD:refs/heads/master" | 28 | command: "git push --force git+ssh://git@push-par-clevercloud-customers.services.clever-cloud.com/{{ clever_app }}.git HEAD:refs/heads/master" |
29 | register: clever_git_push | ||
30 | ignore_errors: true | ||
31 | tags: | ||
32 | - skip_ansible_lint | ||
33 | |||
34 | - name: First time push to Clever-Cloud needs a full git clone | ||
35 | command: "git fetch --unshallow" | ||
36 | when: | ||
37 | - clever_git_push is failed | ||
38 | - clever_git_push.stderr is search("shallow update not allowed") | ||
39 | tags: | ||
40 | - skip_ansible_lint | ||
41 | |||
42 | - name: Push to Clever-Cloud to trigger deployment | ||
43 | command: "git push --force git+ssh://git@push-par-clevercloud-customers.services.clever-cloud.com/{{ clever_app }}.git HEAD:refs/heads/master" | ||
44 | when: clever_git_push is failed | ||
29 | tags: | 45 | tags: |
30 | - skip_ansible_lint | 46 | - skip_ansible_lint |
31 | 47 | ||