Skip to content
Snippets Groups Projects
Commit 659f058f authored by jurgenhaas's avatar jurgenhaas
Browse files

Improve config collect to support git flow: skip ci with a git hook prepare-commit-msg

parent 2bf69e72
No related branches found
No related tags found
No related merge requests found
......@@ -7,8 +7,7 @@
chdir: '{{ webRoot }}'
become: false
with_items:
- 'flow hotfix finish -F -p -m "[ci skip] Config export {{ version }}" {{ version }}'
# TODO: How can we make sure that anything that commits to master will contain something that skips the CI?
- 'flow hotfix finish -F -p -m "Config export {{ version }}" {{ version }}'
- name: "Delete webroot working copy"
file:
......
......@@ -3,7 +3,7 @@
- block:
- set_fact:
version='{{ lookup('pipe','date +%Y%m%d-%H%M%S') }}'
version='{{ lookup('pipe','date +%Y-%m-%d-%H-%M-%S') }}'
- set_fact:
webRoot='/tmp/ansible-cae-{{ drupal.jail.name }}-{{ version }}-gitflow'
- set_fact:
......
......@@ -10,6 +10,14 @@
version: '{{ drupal.src.git.branch|default(omit) }}'
become: false
- name: "Create Git Hook for commit message"
copy:
content: |
#!/bin/sh
echo "[ci skip]" >>$1
dest: '{{ webRoot }}/.git/hooks/prepare-commit-msg'
mode: '0777'
- name: "Start Hotfix"
shell: 'git {{ item }}'
args:
......
......@@ -35,7 +35,6 @@
loop_control:
loop_var: drupal
tags: 'deploy'
#when: limit_site is not defined or drupal.id is not defined or limit_site == drupal.id
when: false
when: limit_site is not defined or drupal.id is not defined or limit_site == drupal.id
when: '"drupal" not in excluded_roles and drupal_install_drupal and collect_config is defined and collect_config'
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment