feat: scope cleanup to app when specified

This will require changes in community plugins to properly add the specified labels to intermediate containers.

Closes #3515
This commit is contained in:
Jose Diaz-Gonzalez
2019-07-18 04:28:45 -04:00
parent d1af10fc51
commit 193e40b4c3
4 changed files with 69 additions and 18 deletions

View File

@@ -42,6 +42,7 @@ apps_destroy() {
plugn trigger scheduler-stop "$DOKKU_SCHEDULER" "$APP" "$REMOVE_CONTAINERS"
plugn trigger scheduler-post-delete "$DOKKU_SCHEDULER" "$APP" "$IMAGE_TAG"
plugn trigger post-delete "$APP" "$IMAGE_TAG"
docker_cleanup "$APP" "true"
}
apps_exists() {

View File

@@ -30,6 +30,7 @@ apps_rename_cmd() {
[[ -f "$DOKKU_ROOT/$NEW_APP/hooks/pre-receive" ]] && sed -i -e "s/git-hook $OLD_APP/git-hook $NEW_APP/g" "$DOKKU_ROOT/$NEW_APP/hooks/pre-receive"
ps_rebuild "$NEW_APP"
plugn trigger post-app-rename "$OLD_APP" "$NEW_APP"
docker_cleanup "$OLD_APP" "true"
echo "Renaming $OLD_APP to $NEW_APP... done"
}