Add maybe a working implementation
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
bdeba12004
commit
9655b55dd7
18
plugin.sh
18
plugin.sh
|
@ -2,22 +2,24 @@
|
|||
|
||||
|
||||
load_deploy_key() {
|
||||
PLUGIN_COMPOSE=${PLUGIN_COMPOSE:-compose.yml}
|
||||
echo "FOUND THE FOLLOWING SETTINGS..."
|
||||
echo "$PLUGIN_STACK"
|
||||
echo "$PLUGIN_HOST"
|
||||
echo "$PLUGIN_COMPOSE"
|
||||
echo "$PLUGIN_DEPLOY_KEY"
|
||||
echo "-------------------------------"
|
||||
eval `ssh-agent`
|
||||
echo "$PLUGIN_DEPLOY_KEY" | ssh-add -
|
||||
}
|
||||
|
||||
run_stack_deploy() {
|
||||
echo "TODO: run_stack_deploy"
|
||||
PLUGIN_COMPOSE=${PLUGIN_COMPOSE:-compose.yml}
|
||||
|
||||
docker stack deploy \
|
||||
-c "$PLUGIN_COMPOSE" \
|
||||
-H "$PLUGIN_HOST" \
|
||||
"$PLUGIN_STACK"
|
||||
}
|
||||
|
||||
run_plugin() {
|
||||
echo "--- Starting deployment ---"
|
||||
load_deploy_key
|
||||
run_stack_deploy
|
||||
echo "--- Deployment successful ---"
|
||||
}
|
||||
|
||||
run_plugin
|
||||
|
|
Reference in New Issue