Use global DOCKER_HOST
This commit is contained in:
parent
a62a8a1432
commit
efa7f00320
10
plugin.sh
10
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() {
|
||||
|
|
Reference in New Issue