-
Notifications
You must be signed in to change notification settings - Fork 18
/
.lagoon.yml
88 lines (84 loc) · 3.43 KB
/
.lagoon.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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
docker-compose-yaml: docker-compose.yml
environments:
master:
cronjobs:
- name: Drupal cron with notifications
schedule: "M * * * *"
command: '/app/vendor/bin/govcms-drush cron --root=/app'
service: cli
# Note regarding tasks in the scaffold.
# Please avoid making scripts more than one or two lines, and avoid if/else logic.
# When PaaS users or the support team modify this file, it should be easy to turn things on and off.
tasks:
# Pre-rollout tasks do not get called on first deploy; use post-rollout tasks instead.
# Pre-rollout tasks need to have file existance checks as these are run in the active
# containers and it is not guaranteed that the commands will be available there.
pre-rollout:
- run:
name: Pre-rollout database updates
command: "[ -f /app/vendor/bin/govcms-pre-deploy-db-update ] && /app/vendor/bin/govcms-pre-deploy-db-update || echo 'Pre Update databse is not available.'"
service: cli
shell: bash
when: withDefault("GOVCMS_SKIP_PRE_DEPLOY_UPDATE", false) == false
- run:
name: Snapshot the database and store
command: "[ -f /app/vendor/bin/govcms-db-backup ] && /app/vendor/bin/govcms-db-backup || echo 'Database backup is not available.'"
service: cli
shell: bash
when: withDefault("GOVCMS_SKIP_PRE_DEPLOY_DB_BACKUP", false) == false
- run:
name: Snapshot the config and store
command: "[ -f /app/vendor/bin/govcms-config-backup ] && /app/vendor/bin/govcms-config-backup || echo 'Config backup is not available.'"
service: cli
shell: bash
when: withDefault("GOVCMS_SKIP_PRE_DEPLOY_CONFIG_BACKUP", false) == false
post-rollout:
- run:
name: Prepare the site for deployment
command: /app/vendor/bin/govcms-update_site_alias
service: cli
shell: bash
## START SaaS-only
- run:
name: Perform GovCMS platform validations
command: 'shipshape -f /app/vendor/govcms/scaffold-tooling/shipshape.yml --exclude-db --error-code'
service: cli
shell: bash
when: withDefault("GOVCMS_SKIP_AUDIT", false) == false
## END SaaS-only
- run:
name: Synchronise the database
command: /app/vendor/bin/govcms-db-sync
service: cli
shell: bash
when: withDefault("GOVCMS_SKIP_DB_SYNC", false) == false
- run:
name: Perform database updates
command: /app/vendor/bin/govcms-db-update
service: cli
shell: bash
when: withDefault("GOVCMS_SKIP_DB_UPDATE", false) == false
- run:
name: Perform config import
command: /app/vendor/bin/govcms-config-import
service: cli
shell: bash
when: withDefault("GOVCMS_SKIP_CONFIG_IMPORT", false) == false
- run:
name: Perform cache rebuild
command: /app/vendor/bin/govcms-cache-rebuild
service: cli
shell: bash
when: withDefault("GOVCMS_SKIP_CACHE_REBUILD", false) == false
- run:
name: Ensure GovCMS/Lagoon modules are enabled
command: /app/vendor/bin/govcms-enable_modules
service: cli
shell: bash
when: withDefault("GOVCMS_SKIP_ENABLE_MODULES", false) == false
- run:
name: Preserve the last successful backup
command: /app/vendor/bin/govcms-backups-preserve
service: cli
shell: bash
when: withDefault("GOVCMS_SKIP_PRESERVE_BACKUP", false) == false