Skip to content

Commit 20dbad1

Browse files
authored
Merge pull request #24 from UCEAP/dx/deploy
toggle maintenance mode for deployments
2 parents 793fef4 + 8ae4b48 commit 20dbad1

9 files changed

Lines changed: 11 additions & 16 deletions

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ I frequently invoke `uceap refresh-content` to reset my local environment after
2323
> uceap refresh-content
2424
> git checkout -
2525
> composer install
26-
> drush $DRUSH_TASK
26+
> drush deploy
2727
> ```
2828
2929
Troubleshooting an issue on the live site? `TERMINUS_ENV=live uceap refresh-content` will pull the latest backup of the database and files from LIVE. _You'll be knee-deep in PII in no time!_ **Be sure to reset your database and files with DEV data as soon as you're done.**

local/etc/uceap.d/_assert_terminus_vars.sh

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,4 @@ function _assert_terminus_vars() {
88
echo "TERMINUS_SITE environment variable is not set."
99
exit 1
1010
fi
11-
12-
if [ -z "$DRUSH_TASK" ]; then
13-
echo "DRUSH_TASK environment variable is not set."
14-
exit 1
15-
fi
1611
}

local/etc/uceap.d/_deploy_code.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
function _deploy_code() {
22
_assert_terminus_vars
3+
terminus drush -- state-set system.maintenance_mode TRUE
34
_sftp_code
4-
terminus drush -- $DRUSH_TASK
5+
terminus drush -- deploy
6+
terminus drush -- state-set system.maintenance_mode FALSE
57
}

local/etc/uceap.d/_pantheon_deploy.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ function _pantheon_deploy() {
88

99
function _pantheon_complete_deployment() {
1010
terminus drush -- cache-rebuild
11-
terminus drush -- $DRUSH_TASK
11+
terminus drush -- deploy
1212
sleep 60
13+
terminus drush -- state-set system.maintenance_mode FALSE
1314
terminus env:clear-cache
1415
}

local/etc/uceap.d/deploy-to-dev.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,5 @@ uceap deploy-to-dev
1717
1818
## Description
1919
20-
This command requires the `TERMINUS_SITE` and `DRUSH_TASK` environment variables to be set.
20+
This command requires the `TERMINUS_SITE` environment variable to be set.
2121
'

local/etc/uceap.d/deploy-to-live.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,5 @@ uceap deploy-to-live
1818
1919
## Description
2020
21-
This command requires the `TERMINUS_SITE` and `DRUSH_TASK` environment variables to be set.
21+
This command requires the `TERMINUS_SITE` environment variable to be set.
2222
'

local/etc/uceap.d/deploy-to-multidev.sh

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,5 @@ TERMINUS_ENV=pr-1234 uceap deploy-to-multidev
1515
1616
## Description
1717
18-
This command requires the `TERMINUS_SITE` and `DRUSH_TASK` environment variables to be set.
19-
20-
It also requires the `TERMINUS_ENV` environment variable to be set.
18+
This command requires the `TERMINUS_SITE` and `TERMINUS_ENV` environment variables to be set.
2119
'

local/etc/uceap.d/deploy-to-test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ uceap deploy-to-test --no-sync
2727
2828
## Description
2929
30-
This command requires the `TERMINUS_SITE` and `DRUSH_TASK` environment variables to be set.
30+
This command requires the `TERMINUS_SITE` environment variable to be set.
3131
3232
Deploying to TEST will automatically copy database and files from LIVE to TEST.
3333

local/etc/uceap.d/devcontainer_on_create.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,7 @@ function devcontainer_on_create() {
5151
sudo find web/sites/default/files -type f -exec chmod g+w {} +
5252

5353
# The database image might be out of date so deploy any new changes from code
54-
vendor/bin/drush cr
55-
vendor/bin/drush $DRUSH_TASK
54+
vendor/bin/drush deploy
5655

5756
# Setup drush and other vendor binaries
5857
echo "export PATH=\"`pwd`/vendor/bin:\$PATH\"" | tee -a ~/.bashrc ~/.zshrc ~/.zshrc.local

0 commit comments

Comments
 (0)