Added rebuild command after stack delete.

This commit is contained in:
Wayne Connolly
2019-02-24 19:49:43 +11:00
committed by GitHub
parent fc857f14f9
commit c50cae2cbd
+2
View File
@@ -28,6 +28,8 @@ if grep -q degraded /status; then
ID=`sed -e 's/\s.*$//' /status`
/bin/rancher --url http://${PLUGIN_URL} --access-key ${ACCESSKEY} --secret-key ${SECRETKEY} rm $ID
sleep 60s
echo 'Rebuilding new stack'
/bin/rancher --url http://${PLUGIN_URL} --access-key ${ACCESSKEY} --secret-key ${SECRETKEY} up --stack ${PLUGIN_STACK} -d -f ${DOCKER_COMPOSE} --rancher-file ${RANCHER_COMPOSE} --pull --force-recreate --confirm-upgrade
else
echo 'Stack healthy or not found. Creating/Updating stack with force upgrade'
/bin/rancher --url http://${PLUGIN_URL} --access-key ${ACCESSKEY} --secret-key ${SECRETKEY} up --stack ${PLUGIN_STACK} -d -f ${DOCKER_COMPOSE} --rancher-file ${RANCHER_COMPOSE} --pull --force-recreate --confirm-upgrade