forked from goalgorilla/social_template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
wodby.yml
60 lines (52 loc) · 2.5 KB
/
wodby.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
# For more info about Post deployment scripts in Wodby see:
# https://docs.wodby.com/deployment/post-deployment-scripts.html
pipeline:
- name: Ignore ssh host key check for git
type: command
command: 'printf "Host bitbucket.org github.com\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config'
# TODO: Improve check if we need to use this as permanent solution.
only_if: '[ $(grep -c "Host bitbucket.org" ~/.ssh/config) -eq 0 ]'
- name: Git sub-modules setup
type: command
command: git submodule update --init --checkout
directory: $WODBY_APP_ROOT
- name: Download composer dependencies in parallel
type: command
command: composer global require hirak/prestissimo:^0.3 --optimize-autoloader > /dev/null 2>&1
directory: $WODBY_APP_ROOT
- name: Composer install (Live)
type: command
command: composer install --no-dev --optimize-autoloader --no-progress
directory: $WODBY_APP_ROOT
# Only run in Production
only_if: '[ "$WODBY_ENVIRONMENT_TYPE" = "prod" ]'
- name: Set Admin mail to webmaster, for consistent pass reset.
type: command
# TODO Remember this: https://www.drupal.org/project/drupal/issues/540008
command: drush sqlq 'UPDATE users_field_data SET name="Ramsalt Lab", mail="[email protected]" WHERE uid = 1 LIMIT 1;'
directory: $WODBY_APP_DOCROOT
# Only run in Production
only_if: '[ ! -z "$(drush st --fields=bootstrap)" ] && [ "$WODBY_ENVIRONMENT_TYPE" = "prod" ]'
- name: Disable login for '*@ramsalt.com' accounts.
type: command
command: drush sqlq "UPDATE users_field_data SET pass='#' WHERE mail LIKE '%@ramsalt.com';"
directory: $WODBY_APP_DOCROOT
# Only run in Production
only_if: '[ ! -z "$(drush st --fields=bootstrap)" ] && [ "$WODBY_ENVIRONMENT_TYPE" = "prod" ]'
- name: Composer install (Dev/Staging)
type: command
command: composer install --no-progress
directory: $WODBY_APP_ROOT
only_if: '[ "$WODBY_ENVIRONMENT_TYPE" != "prod" ]'
- name: Run DB Updates
type: command
command: drush -q -y updb --entity-updates
directory: $WODBY_APP_DOCROOT
# Do *not* run in Production and if Drupal can't bootstrap
only_if: '[ ! -z "$(drush st --fields=bootstrap)" ] && [ "$WODBY_ENVIRONMENT_TYPE" != "prod" ]'
- name: Rebuild Caches
type: command
command: drush -q -y cache-rebuild
directory: $WODBY_APP_DOCROOT
# Do *not* run in Production and if Drupal can't bootstrap
only_if: '[ ! -z "$(drush st --fields=bootstrap)" ] && [ "$WODBY_ENVIRONMENT_TYPE" != "prod" ]'