feat: add subcommands to allow app locking and unlocking

Unlocking an app will not stop running deploys, so users may need to clean up. However, it is useful for deploys that fail in unusual ways that cause the lock to stay around.

Closes #2883
This commit is contained in:
Jose Diaz-Gonzalez
2018-03-04 01:04:21 -05:00
parent bed573ebe8
commit 165b6ff46f
7 changed files with 129 additions and 4 deletions

View File

@@ -1160,8 +1160,8 @@ acquire_app_deploy_lock() {
local LOCK_TYPE="${2:-waiting}"
local APP_DEPLOY_LOCK_FD="200"
local APP_DEPLOY_LOCK_FILE="$DOKKU_ROOT/$APP/.deploy.lock"
local LOCK_WAITING_MSG="$APP is currently being deployed. Waiting..."
local LOCK_FAILED_MSG="$APP is currently being deployed. Exiting..."
local LOCK_WAITING_MSG="$APP currently has a deploy lock in place. Waiting..."
local LOCK_FAILED_MSG="$APP currently has a deploy lock in place. Exiting..."
local SHOW_MSG=true
eval "exec $APP_DEPLOY_LOCK_FD>$APP_DEPLOY_LOCK_FILE"