feat: add ability to manage stacks on an app or global level

The previous lever for manipulating this was the DOKKU_IMAGE environment variable. While this is all well and good, it only works for CNB and is yet another `DOKKU_*` environment variable that need not exist.

While this does not add support for manipulating the CNB stack just yet, the groundwork is set for the future.

Closes #4306
This commit is contained in:
Jose Diaz-Gonzalez committed 2021-01-23 16:19:12 -05:00
1 parent 4c74e0dfba
commit bad90b2b1d
11 files changed
+134 -8

No files matched your search

+2 -2
View File
@@ -21,9 +21,9 @@ trigger-builder-herokuish-builder-build() {
pushd "$SOURCECODE_WORK_DIR" &>/dev/null
eval "$(config_export app "$APP")"
DOKKU_IMAGE="$(plugn trigger buildpack-stack-name "$APP")"
DOKKU_IMAGE="$(config_get "$APP" DOKKU_IMAGE || echo "$DOKKU_IMAGE")"
eval "$(config_export app "$APP")"
plugn trigger builder-create-dokku-image "$BUILDER_TYPE" "$APP" "$SOURCECODE_WORK_DIR" "$DOKKU_IMAGE"
NEW_DOKKU_IMAGE=$(plugn trigger builder-dokku-image "$BUILDER_TYPE" "$APP" "$SOURCECODE_WORK_DIR" "$DOKKU_IMAGE")
[[ -n "$NEW_DOKKU_IMAGE" ]] && DOKKU_IMAGE="$NEW_DOKKU_IMAGE"