Add port and drop ssh:// from user side
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
10
plugin.sh
10
plugin.sh
@ -1,22 +1,24 @@
|
||||
#!/bin/sh
|
||||
|
||||
PLUGIN_PORT=${PLUGIN_PORT:-22}
|
||||
PLUGIN_COMPOSE=${PLUGIN_COMPOSE:-compose.yml}
|
||||
|
||||
load_deploy_key() {
|
||||
mkdir -p "$HOME/.ssh/"
|
||||
ssh-keyscan "$PLUGIN_HOST" > "$HOME/.ssh/known_hosts"
|
||||
ssh-keyscan -p "$PLUGIN_PORT" "$PLUGIN_HOST" > "$HOME/.ssh/known_hosts"
|
||||
|
||||
eval `ssh-agent`
|
||||
echo "$PLUGIN_DEPLOY_KEY" | ssh-add -
|
||||
}
|
||||
|
||||
run_stack_deploy() {
|
||||
PLUGIN_COMPOSE=${PLUGIN_COMPOSE:-compose.yml}
|
||||
|
||||
echo "--- start docker info ---"
|
||||
docker version
|
||||
echo "--- end docker info ---"
|
||||
|
||||
docker -H "$PLUGIN_HOST" stack deploy -c "$PLUGIN_COMPOSE" "$PLUGIN_STACK"
|
||||
docker \
|
||||
-H "ssh://$PLUGIN_HOST:$PLUGIN_PORT" \
|
||||
stack deploy -c "$PLUGIN_COMPOSE" "$PLUGIN_STACK"
|
||||
}
|
||||
|
||||
run_plugin() {
|
||||
|
||||
Reference in New Issue
Block a user