refactor: move app.json script execution into it's own plugin
Rather than have this live in 00_dokku-standard, move it out so that it may start to support various other features around the app.json manifest.
This commit is contained in:
4
plugins/app-json/plugin.toml
Normal file
4
plugins/app-json/plugin.toml
Normal file
@@ -0,0 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core app-json plugin"
|
||||
version = "0.13.4"
|
||||
[plugin.config]
|
||||
@@ -2,11 +2,11 @@
|
||||
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"
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/app-json/internal-functions"
|
||||
|
||||
exec_app_json_scripts() {
|
||||
declare desc="core app.json scripts execution"
|
||||
local trigger="post-deploy app_json_scripts"
|
||||
app_json_post_deploy() {
|
||||
declare desc="app-json scripts execution"
|
||||
local trigger="app_json_post_deploy"
|
||||
local APP="$1"
|
||||
local IMAGE_TAG="$4"
|
||||
local PHASE_SCRIPT_KEY="postdeploy"
|
||||
@@ -15,4 +15,4 @@ exec_app_json_scripts() {
|
||||
execute_script "$APP" "$IMAGE_TAG" "$PHASE_SCRIPT_KEY"
|
||||
}
|
||||
|
||||
exec_app_json_scripts "$@"
|
||||
app_json_post_deploy "$@"
|
||||
@@ -2,11 +2,11 @@
|
||||
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"
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/app-json/internal-functions"
|
||||
|
||||
exec_app_json_scripts() {
|
||||
declare desc="core app.json scripts execution"
|
||||
local trigger="pre-deploy app_json_scripts"
|
||||
app_json_pre_deploy() {
|
||||
declare desc="app-json scripts execution"
|
||||
local trigger="app_json_pre_deploy"
|
||||
local APP="$1"
|
||||
local IMAGE_TAG="$2"
|
||||
local PHASE_SCRIPT_KEY="predeploy"
|
||||
@@ -15,4 +15,4 @@ exec_app_json_scripts() {
|
||||
execute_script "$APP" "$IMAGE_TAG" "$PHASE_SCRIPT_KEY"
|
||||
}
|
||||
|
||||
exec_app_json_scripts "$@"
|
||||
app_json_pre_deploy "$@"
|
||||
Reference in New Issue
Block a user