Use global DOCKER_HOST

This commit is contained in:
Luke Murphy 2020-09-25 20:03:10 +02:00
parent a62a8a1432
commit efa7f00320
No known key found for this signature in database
GPG Key ID: 5E2EF5A63E3718CC
1 changed files with 7 additions and 3 deletions

View File

@ -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() {