forked from forem/forem
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Halt Deploys With release script if ENV variable DEPLOY_STATUS is set…
… to blocked (forem#5510) [deploy]
- Loading branch information
Showing
2 changed files
with
24 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,11 @@ | ||
#!/bin/bash | ||
|
||
STATEMENT_TIMEOUT=180000 bundle exec rails db:migrate && rails runner "puts 'app load success'" | ||
# enable echo mode | ||
set -x | ||
|
||
# abort release if deploy status equals "blocked" | ||
[[ $DEPLOY_STATUS = "blocked" ]] && echo "Deploy blocked" && exit 1 | ||
|
||
# runs migration and boots the app to check there are no errors | ||
STATEMENT_TIMEOUT=180000 bundle exec rails db:migrate && \ | ||
bundle exec rails runner "puts 'app load success'" |