Merge pull request #4627 from Tarow/custom-cnb-stack

Respect custom stack when using cloud native builder
This commit is contained in:
Jose Diaz-Gonzalez
2021-05-31 15:53:51 -04:00
committed by GitHub
2 changed files with 4 additions and 4 deletions

View File

@@ -69,7 +69,7 @@ dokku buildpacks:set-property node-js-app stack
A change in the stack builder value will execute the `post-stack-set` trigger.
Finally, stack builders can be set or unset globally as a fallback. This will take precedence over a globally set `DOKKU_CNB_STACK` environment variable (`heroku/buildpacks` by default).
Finally, stack builders can be set or unset globally as a fallback. This will take precedence over a globally set `DOKKU_CNB_BUILDER` environment variable (`heroku/buildpacks` by default).
```shell
# set globally

View File

@@ -14,11 +14,11 @@ trigger-builder-pack-builder-build() {
fi
local stack="$(plugn trigger buildpack-stack-name "$APP")"
if [[ -z "$stack" ]]; then
DOKKU_CNB_STACK="$stack"
if [[ -n "$stack" ]]; then
DOKKU_CNB_BUILDER="$stack"
fi
dokku_log_info1 "Building $APP from cnb stack $DOKKU_CNB_STACK (experimental)..."
dokku_log_info1 "Building $APP from cnb stack $DOKKU_CNB_BUILDER (experimental)..."
if ! command -v "pack" &>/dev/null; then
dokku_log_fail "Missing pack, install it"