Merge pull request #1261 from Flink/bypass-checks-on-demand

Allows to skip checks (all or default)
This commit is contained in:
Jose Diaz-Gonzalez committed 2015-07-11 16:31:21 -04:00
commit 43b179735b
3 files changed
+17 -4

No files matched your search

+11 -4
View File
@@ -73,6 +73,9 @@ case "$1" in
DOKKU_SCALE_FILE="$DOKKU_ROOT/$APP/DOKKU_SCALE"
oldids=$(get_container_ids $APP)
[[ -f "$DOKKU_ROOT/ENV" ]] && source $DOKKU_ROOT/ENV
[[ -f "$DOKKU_ROOT/$APP/ENV" ]] && source $DOKKU_ROOT/$APP/ENV
while read line || [ -n "$line" ]
do
PROC_TYPE=${line%%=*}
@@ -118,10 +121,14 @@ case "$1" in
}
# run checks first, then post-deploy hooks, which switches Nginx traffic
trap kill_new INT TERM EXIT
dokku_log_info1 "Running pre-flight checks"
pluginhook check-deploy $APP $id $PROC_TYPE $port $ipaddr
trap - INT TERM EXIT
if [[ "$DOKKU_SKIP_ALL_CHECKS" = "true" ]]; then
dokku_log_info1 "Skipping pre-flight checks"
else
trap kill_new INT TERM EXIT
dokku_log_info1 "Running pre-flight checks"
pluginhook check-deploy $APP $id $PROC_TYPE $port $ipaddr
trap - INT TERM EXIT
fi
# now using the new container
[[ -n "$id" ]] && echo $id > "$DOKKU_CONTAINER_ID_FILE"