diff --git a/tasks/collect_config/finish/git.yml b/tasks/collect_config/finish/git.yml index 19101f14c6b9330ce0eef42c3fb74a6e39bb2fab..7252e93dba325e1bd59f38352ff4d0b02049b3ce 100644 --- a/tasks/collect_config/finish/git.yml +++ b/tasks/collect_config/finish/git.yml @@ -1,6 +1,19 @@ --- # file: roles/drupal/tasks/config_collect/finish/git.yml -- name: Set facts - set_fact: - dummy: yes +- block: + + - name: Push changes + shell: git push + args: + chdir: '{{ webRoot }}' + become: no + when: git_status.stdout != '' + + - name: Delete webroot working copy + file: + path: '{{ webRoot }}' + state: absent + + tags: + - deploy diff --git a/tasks/collect_config/prepare/git.yml b/tasks/collect_config/prepare/git.yml index 81d3f9a9fbb5d58221e75fc0e4ee11ab00ad4c4d..8adf3d188c3863d0f22819c40e8737789f805ae5 100644 --- a/tasks/collect_config/prepare/git.yml +++ b/tasks/collect_config/prepare/git.yml @@ -1,6 +1,24 @@ --- # file: roles/drupal/tasks/config_collect/prepare/git.yml -- name: Set facts - set_fact: - dummy: yes +- block: + + - name: Clone Git Repository + git: + accept_hostkey: yes + repo: '{{ drupal.src.git.repository }}' + dest: '{{ webRoot }}' + force: yes + version: '{{ drupal.src.git.branch|default(omit) }}' + become: no + + - name: Create Git Hook for commit message + copy: + content: | + #!/bin/sh + echo "[ci skip]" >>$1 + dest: '{{ webRoot }}/.git/hooks/prepare-commit-msg' + mode: 0777 + + tags: + - deploy diff --git a/tasks/collect_config/prepare/gitflow.yml b/tasks/collect_config/prepare/gitflow.yml index ec331972447b45dfd4d3459067d2bfc86e81d676..dfaf6a9467ae1da77998ca5585ad28deaacce7cf 100644 --- a/tasks/collect_config/prepare/gitflow.yml +++ b/tasks/collect_config/prepare/gitflow.yml @@ -3,22 +3,7 @@ - block: - - name: Clone Git Repository - git: - accept_hostkey: yes - repo: '{{ drupal.src.git.repository }}' - dest: '{{ webRoot }}' - force: yes - version: '{{ drupal.src.git.branch|default(omit) }}' - become: no - - - name: Create Git Hook for commit message - copy: - content: | - #!/bin/sh - echo "[ci skip]" >>$1 - dest: '{{ webRoot }}/.git/hooks/prepare-commit-msg' - mode: 0777 + - include_tasks: git.yml - name: Start Hotfix shell: git {{ item }}