diff --git a/plugin.sh b/plugin.sh index a0d89c3..224094c 100755 --- a/plugin.sh +++ b/plugin.sh @@ -5,8 +5,11 @@ set -e PLUGIN_COMPOSE=${PLUGIN_COMPOSE:-compose.yml} PLUGIN_HOST=${PLUGIN_HOST:-swarm.autonomic.zone} PLUGIN_PORT=${PLUGIN_PORT:-222} +PLUGIN_PURGE=${PLUGIN_PURGE:-"false"} PLUGIN_USER=${PLUGIN_USER:-drone} +export DOCKER_HOST="ssh://$PLUGIN_USER@$PLUGIN_HOST:$PLUGIN_PORT" + generate_secrets() { echo "--- start secrets ---" # FIXME 3wc: use the yq docker image instead; couldn't easily get it working @@ -36,9 +39,10 @@ run_stack_deploy() { docker version echo "--- end docker info ---" - docker \ - -H "ssh://$PLUGIN_USER@$PLUGIN_HOST:$PLUGIN_PORT" \ - stack deploy -c "$PLUGIN_COMPOSE" "$PLUGIN_STACK" +run_stack_deploy() { + echo "--- start deploy ---" + docker stack deploy -c "$PLUGIN_COMPOSE" "$PLUGIN_STACK" + echo "--- end deploy ---" } run_stack_wait() {