diff --git a/plugins/caddy-vhosts/command-functions b/plugins/caddy-vhosts/command-functions index 351cf88e5..a8d56f85f 100755 --- a/plugins/caddy-vhosts/command-functions +++ b/plugins/caddy-vhosts/command-functions @@ -1,5 +1,6 @@ #!/usr/bin/env bash source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions" +source "$PLUGIN_CORE_AVAILABLE_PATH/common/property-functions" source "$PLUGIN_AVAILABLE_PATH/proxy/command-functions" source "$PLUGIN_AVAILABLE_PATH/caddy-vhosts/internal-functions" set -eo pipefail diff --git a/plugins/caddy-vhosts/pre-restore b/plugins/caddy-vhosts/pre-restore index 4990a7d8e..3e357b296 100755 --- a/plugins/caddy-vhosts/pre-restore +++ b/plugins/caddy-vhosts/pre-restore @@ -1,5 +1,6 @@ #!/usr/bin/env bash source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions" +source "$PLUGIN_CORE_AVAILABLE_PATH/common/property-functions" source "$PLUGIN_AVAILABLE_PATH/caddy-vhosts/command-functions" set -eo pipefail [[ $DOKKU_TRACE ]] && set -x diff --git a/plugins/common/functions b/plugins/common/functions index a3ed2c9ef..060cb7f34 100755 --- a/plugins/common/functions +++ b/plugins/common/functions @@ -636,6 +636,10 @@ release_and_deploy() { local exit_code=0 if verify_image "$IMAGE"; then + if ! declare -f -F fn-plugin-property-get-default >/dev/null; then + source "$PLUGIN_CORE_AVAILABLE_PATH/common/property-functions" + fi + IMAGE_SOURCE_TYPE="$(get_image_builder_type "$IMAGE" "$APP")" local DOKKU_APP_SKIP_DEPLOY="$(fn-plugin-property-get-default "ps" "$APP" "skip-deploy" "")" local DOKKU_GLOBAL_SKIP_DEPLOY="$(fn-plugin-property-get-default "ps" "--global" "skip-deploy" "")" diff --git a/plugins/haproxy-vhosts/command-functions b/plugins/haproxy-vhosts/command-functions index 20358ec13..00ac09698 100755 --- a/plugins/haproxy-vhosts/command-functions +++ b/plugins/haproxy-vhosts/command-functions @@ -1,5 +1,6 @@ #!/usr/bin/env bash source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions" +source "$PLUGIN_CORE_AVAILABLE_PATH/common/property-functions" source "$PLUGIN_AVAILABLE_PATH/proxy/command-functions" source "$PLUGIN_AVAILABLE_PATH/haproxy-vhosts/internal-functions" set -eo pipefail diff --git a/plugins/haproxy-vhosts/pre-restore b/plugins/haproxy-vhosts/pre-restore index ed637bd96..ca74e46a1 100755 --- a/plugins/haproxy-vhosts/pre-restore +++ b/plugins/haproxy-vhosts/pre-restore @@ -1,5 +1,6 @@ #!/usr/bin/env bash source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions" +source "$PLUGIN_CORE_AVAILABLE_PATH/common/property-functions" source "$PLUGIN_AVAILABLE_PATH/haproxy-vhosts/command-functions" set -eo pipefail [[ $DOKKU_TRACE ]] && set -x diff --git a/plugins/nginx-vhosts/pre-restore b/plugins/nginx-vhosts/pre-restore index 40565f897..e326fdb9f 100755 --- a/plugins/nginx-vhosts/pre-restore +++ b/plugins/nginx-vhosts/pre-restore @@ -1,5 +1,6 @@ #!/usr/bin/env bash source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions" +source "$PLUGIN_CORE_AVAILABLE_PATH/common/property-functions" source "$PLUGIN_AVAILABLE_PATH/nginx-vhosts/command-functions" set -eo pipefail [[ $DOKKU_TRACE ]] && set -x diff --git a/plugins/openresty-vhosts/command-functions b/plugins/openresty-vhosts/command-functions index 09ad8f708..a3515429e 100755 --- a/plugins/openresty-vhosts/command-functions +++ b/plugins/openresty-vhosts/command-functions @@ -1,5 +1,6 @@ #!/usr/bin/env bash source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions" +source "$PLUGIN_CORE_AVAILABLE_PATH/common/property-functions" source "$PLUGIN_AVAILABLE_PATH/proxy/command-functions" source "$PLUGIN_AVAILABLE_PATH/openresty-vhosts/internal-functions" set -eo pipefail diff --git a/plugins/openresty-vhosts/pre-restore b/plugins/openresty-vhosts/pre-restore index 8903a23ae..f347f2629 100755 --- a/plugins/openresty-vhosts/pre-restore +++ b/plugins/openresty-vhosts/pre-restore @@ -1,5 +1,6 @@ #!/usr/bin/env bash source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions" +source "$PLUGIN_CORE_AVAILABLE_PATH/common/property-functions" source "$PLUGIN_AVAILABLE_PATH/openresty-vhosts/command-functions" set -eo pipefail [[ $DOKKU_TRACE ]] && set -x diff --git a/plugins/traefik-vhosts/command-functions b/plugins/traefik-vhosts/command-functions index 6e43edce1..9d7a922a1 100755 --- a/plugins/traefik-vhosts/command-functions +++ b/plugins/traefik-vhosts/command-functions @@ -1,5 +1,6 @@ #!/usr/bin/env bash source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions" +source "$PLUGIN_CORE_AVAILABLE_PATH/common/property-functions" source "$PLUGIN_AVAILABLE_PATH/proxy/command-functions" source "$PLUGIN_AVAILABLE_PATH/traefik-vhosts/internal-functions" set -eo pipefail diff --git a/plugins/traefik-vhosts/pre-restore b/plugins/traefik-vhosts/pre-restore index 698d97788..6d641a3fa 100755 --- a/plugins/traefik-vhosts/pre-restore +++ b/plugins/traefik-vhosts/pre-restore @@ -1,5 +1,6 @@ #!/usr/bin/env bash source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions" +source "$PLUGIN_CORE_AVAILABLE_PATH/common/property-functions" source "$PLUGIN_AVAILABLE_PATH/traefik-vhosts/command-functions" set -eo pipefail [[ $DOKKU_TRACE ]] && set -x diff --git a/tests/unit/core_2.bats b/tests/unit/core_2.bats index 26cf2708c..a0f7a4591 100644 --- a/tests/unit/core_2.bats +++ b/tests/unit/core_2.bats @@ -112,6 +112,16 @@ teardown() { assert_urls "http://dokku.example.com" "http://${TEST_APP}.${DOKKU_DOMAIN}" "https://dokku.example.com" "https://${TEST_APP}.${DOKKU_DOMAIN}" "https://test.${DOKKU_DOMAIN}" "http://test.${DOKKU_DOMAIN}" } +@test "(core) release_and_deploy does not emit command not found errors" { + run deploy_app + echo "output: $output" + echo "status: $status" + assert_success + assert_output_not_contains "fn-plugin-property-get-default: command not found" + assert_output_not_contains "fn-plugin-property-get: command not found" + assert_output_not_contains "/common/property-functions: No such file or directory" +} + @test "(core) git-remote (off-port)" { run deploy_app nodejs-express ssh://dokku@127.0.0.1:22333/$TEST_APP echo "output: $output"