Separate version output and add purging
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Luke Murphy 2020-09-25 20:04:36 +02:00
parent 0df62ef7c5
commit 88d595019d
No known key found for this signature in database
GPG Key ID: 5E2EF5A63E3718CC
1 changed files with 17 additions and 5 deletions

View File

@ -36,10 +36,11 @@ load_deploy_key() {
echo "--- end ssh key load ---"
}
run_stack_deploy() {
echo "--- start docker info ---"
output_versions(){
echo "--- start versions"
docker version
echo "--- end docker info ---"
echo "--- end versions"
}
run_stack_deploy() {
echo "--- start deploy ---"
@ -53,8 +54,15 @@ run_stack_wait() {
| bash /dev/stdin "$PLUGIN_STACK"
}
run_purge() {
echo "--- start purge ---"
docker prune --all --volumes --force
echo "--- end purge ---"
}
run_plugin() {
echo "--- start deployment ---"
echo "--- start ssh-stack-deploy ---"
output_versions
load_deploy_key
if [ -n "$PLUGIN_GENERATE_SECRETS" ]; then
@ -63,7 +71,11 @@ run_plugin() {
run_stack_deploy
run_stack_wait
echo "--- end deployment ---"
if [ "$PLUGIN_PURGE" == "true" ]; then
run_purge
fi
echo "--- end ssh-stack-deploy ---"
}
run_plugin