As deployment tasks can fail due to non-dokku related issues, moving them to post-deploy will ensure that dokku does not accidentally orphan applications. Closes #2367
16 lines
582 B
Bash
Executable File
16 lines
582 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
|
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
|
source "$PLUGIN_CORE_AVAILABLE_PATH/00_dokku-standard/exec-app-json-scripts"
|
|
|
|
exec_app_json_scripts() {
|
|
declare desc="core app.json scripts execution"
|
|
local trigger="post-deploy app_json_scripts"
|
|
local APP="$1"; local IMAGE_TAG="$4"; local PHASE_SCRIPT_KEY="postdeploy"
|
|
|
|
dokku_log_info1 "Attempting to run scripts.dokku.$PHASE_SCRIPT_KEY from app.json (if defined)"
|
|
execute_script "$APP" "$IMAGE_TAG" "$PHASE_SCRIPT_KEY"
|
|
}
|
|
|
|
exec_app_json_scripts "$@"
|