Added default for storage plugin to list
This commit is contained in:
1 parent
f2a4f61920
commit
58d774a316
3 files changed
+23
-9
No files matched your search
@@ -2,6 +2,16 @@
|
|||||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||||
|
|
||||||
|
storage_list_cmd() {
|
||||||
|
declare desc="List all bound mounts"
|
||||||
|
local cmd="storage:list"
|
||||||
|
local passed_phases="deploy"
|
||||||
|
[[ ! $2 ]] && dokku_log_fail "storage:list requires an app to list."
|
||||||
|
verify_app_name "$2" && local APP="$2"
|
||||||
|
echo "$APP volume bind-mounts:"
|
||||||
|
get_bind_mounts "$(get_phase_file_path "$passed_phases")"
|
||||||
|
}
|
||||||
|
|
||||||
verify_paths() {
|
verify_paths() {
|
||||||
declare desc="verifies storage paths"
|
declare desc="verifies storage paths"
|
||||||
echo "$1" | grep -qe '^/.*\:/' || dokku_log_fail "Storage path must be two valid paths divided by colon."
|
echo "$1" | grep -qe '^/.*\:/' || dokku_log_fail "Storage path must be two valid paths divided by colon."
|
||||||
|
|||||||
@@ -0,0 +1,13 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||||
|
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||||
|
source "$PLUGIN_CORE_AVAILABLE_PATH/storage/functions"
|
||||||
|
source "$PLUGIN_CORE_AVAILABLE_PATH/docker-options/functions"
|
||||||
|
|
||||||
|
storage_main_cmd() {
|
||||||
|
declare desc="an alias for storage:list"
|
||||||
|
local cmd="storage"
|
||||||
|
storage_list_cmd "$@"
|
||||||
|
}
|
||||||
|
|
||||||
|
storage_main_cmd "$@"
|
||||||
@@ -4,14 +4,5 @@ source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
|||||||
source "$PLUGIN_CORE_AVAILABLE_PATH/storage/functions"
|
source "$PLUGIN_CORE_AVAILABLE_PATH/storage/functions"
|
||||||
source "$PLUGIN_CORE_AVAILABLE_PATH/docker-options/functions"
|
source "$PLUGIN_CORE_AVAILABLE_PATH/docker-options/functions"
|
||||||
|
|
||||||
storage_list_cmd() {
|
|
||||||
declare desc="List all bound mounts"
|
|
||||||
local cmd="storage:list"
|
|
||||||
local passed_phases="deploy"
|
|
||||||
[[ ! $2 ]] && dokku_log_fail "storage:list requires an app to list."
|
|
||||||
verify_app_name "$2" && local APP="$2"
|
|
||||||
echo "$APP volume bind-mounts:"
|
|
||||||
get_bind_mounts "$(get_phase_file_path "$passed_phases")"
|
|
||||||
}
|
|
||||||
|
|
||||||
storage_list_cmd "$@"
|
storage_list_cmd "$@"
|
||||||
Reference in new issue
Block a user