forked from Vardot/varbase-project
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.autogit.yml
66 lines (60 loc) · 2.52 KB
/
.autogit.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#######################################################################################
# ___ __ ______ ______ __________ ______ #
# __ | / /_______ /____ /________________ /___(_)_____________ _ ___ /______ #
# __ | /| / /_ _ \_ __ \_ __ \ __ \_ ___/ __/_ /__ __ \_ __ `/ __ __ \ _ \ #
# __ |/ |/ / / __/ /_/ / / / / /_/ /(__ )/ /_ _ / _ / / / /_/ /___ /_/ / __/ #
# ____/|__/ \___//_.___//_/ /_/\____//____/ \__/ /_/ /_/ /_/_\__, /_(_)_.___/\___/ #
# /____/ #
#######################################################################################
# Autogit - config and deploy hooks #
#######################################################################################
# This YAML file, named as "autogit.yml" should be present #
# in the root folder of your codebase #
#######################################################################################
# Example shared files and folders:
# shared_files: [ etc/config.yml ]
# shared_folders: [ var/log ]
shared_folders:
- www/sites/default/files
# Hooks should be Bash shell scripts and get executed at different stages during deploy
# Arguments: $1 = branch, $2 = commit id, $3 = checkout folder
hooks:
# SETUP: Create folder structure for newest release
setup_before: |
exit 0
setup_after: |
exit 0
# INSTALL: Put code in release folder
install_before: |
exit 0
install_after: |
echo "***** INSTALL COMPOSER *****"
composer install
echo "***** COPY environment settings.${1}.php file to release folder *****"
cp $3/environment/settings.$1.php $3/www/sites/default
exit 0
# SHAREDSYMLINK: Create symlink to shared files and folders
# present at every release (config, logs, ...)
sharedsymlink_before: |
exit 0
sharedsymlink_after: |
echo "***** DRUSH CIM *****"
drush cim -y
echo "***** DRUSH STRUCTURE SYNC IMPORT *****"
drush ia --choice full
echo "***** DRUSH UPDATE DATABASE *****"
drush updb
echo "***** DRUSH CACHE REBUILD *****"
drush cr
exit 0
# SYMLINK: Set current symlink to newest release
symlink_before: |
exit 0
symlink_after: |
exit 0
# CLEANUP: Cleanup old releases, two most recent releases remaining
cleanup_before: |
exit 0
cleanup_after: |
echo "DEPLOY HAS FINISHED"
exit 0