Forge ahead with bash madness

This commit is contained in:
Luke Murphy
2020-04-07 16:29:32 +02:00
parent 4e4999a6d6
commit 052f42347b
5 changed files with 81 additions and 31 deletions

View File

@ -2,24 +2,6 @@
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
dokku-ansible-deploy-post-extract() {
declare APP="$1" TMPDIR="$2"
if [[ -d "$TMPDIR/deploy.d" ]] && [[ "$(ls -A "$TMPDIR/deploy.d")" ]]; then
dokku_col_log_info1_quiet "Copying deploy.d files into place"
mkdir -p "$DOKKU_LIB_ROOT/data/deploy.d/$APP"
cp -r "$TMPDIR/deploy.d/." "$DOKKU_LIB_ROOT/data/deploy.d/$APP"
if [[ -d "$TMPDIR/deploy.d/vault" ]]; then
if [[ ! -f "$DOKKU_LIB_ROOT/data/deploy.d/$APP/.vault-password.sh" ]]; then
dokku_col_log_info1_quiet "Vault folder discovered but missing vault password"
dokku_col_log_info1_quiet "please run dokku dokku-deploy:vault-password $APP"
exit 1
fi
fi
fi
}
source "$PLUGIN_AVAILABLE_PATH/ansible-deploy/functions"
dokku-ansible-deploy-post-extract "$@"