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_COMPOSE=${PLUGIN_COMPOSE:-compose.yml}
|
||||||
PLUGIN_HOST=${PLUGIN_HOST:-swarm.autonomic.zone}
|
PLUGIN_HOST=${PLUGIN_HOST:-swarm.autonomic.zone}
|
||||||
PLUGIN_PORT=${PLUGIN_PORT:-222}
|
PLUGIN_PORT=${PLUGIN_PORT:-222}
|
||||||
|
PLUGIN_PURGE=${PLUGIN_PURGE:-"false"}
|
||||||
PLUGIN_USER=${PLUGIN_USER:-drone}
|
PLUGIN_USER=${PLUGIN_USER:-drone}
|
||||||
|
|
||||||
|
export DOCKER_HOST="ssh://$PLUGIN_USER@$PLUGIN_HOST:$PLUGIN_PORT"
|
||||||
|
|
||||||
generate_secrets() {
|
generate_secrets() {
|
||||||
echo "--- start secrets ---"
|
echo "--- start secrets ---"
|
||||||
# FIXME 3wc: use the yq docker image instead; couldn't easily get it working
|
# FIXME 3wc: use the yq docker image instead; couldn't easily get it working
|
||||||
|
@ -36,9 +39,10 @@ run_stack_deploy() {
|
||||||
docker version
|
docker version
|
||||||
echo "--- end docker info ---"
|
echo "--- end docker info ---"
|
||||||
|
|
||||||
docker \
|
run_stack_deploy() {
|
||||||
-H "ssh://$PLUGIN_USER@$PLUGIN_HOST:$PLUGIN_PORT" \
|
echo "--- start deploy ---"
|
||||||
stack deploy -c "$PLUGIN_COMPOSE" "$PLUGIN_STACK"
|
docker stack deploy -c "$PLUGIN_COMPOSE" "$PLUGIN_STACK"
|
||||||
|
echo "--- end deploy ---"
|
||||||
}
|
}
|
||||||
|
|
||||||
run_stack_wait() {
|
run_stack_wait() {
|
||||||
|
|
Reference in New Issue