Wait for success using docker-stack-wait-deploy
continuous-integration/drone/push Build is passing Details

This commit is contained in:
3wc 2020-09-25 16:11:48 +02:00
parent d5ea15ccb2
commit 171b627e0a
1 changed files with 6 additions and 0 deletions

View File

@ -26,10 +26,16 @@ run_stack_deploy() {
stack deploy -c "$PLUGIN_COMPOSE" "$PLUGIN_STACK" stack deploy -c "$PLUGIN_COMPOSE" "$PLUGIN_STACK"
} }
run_stack_wait() {
export DOCKER_HOST="ssh://$PLUGIN_USER@$PLUGIN_HOST:$PLUGIN_PORT"
docker run --rm vitalets/docker-stack-wait-deploy | sed 's/True/true/' | bash -x /dev/stdin "$PLUGIN_STACK"
}
run_plugin() { run_plugin() {
echo "--- start deployment ---" echo "--- start deployment ---"
load_deploy_key load_deploy_key
run_stack_deploy run_stack_deploy
run_stack_wait
echo "--- end deployment ---" echo "--- end deployment ---"
} }