Separate version output and add purging
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
0df62ef7c5
commit
88d595019d
22
plugin.sh
22
plugin.sh
|
@ -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
|
||||
|
|
Reference in New Issue