Merge pull request #4627 from Tarow/custom-cnb-stack
Respect custom stack when using cloud native builder
This commit is contained in:
@@ -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.
|
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
|
```shell
|
||||||
# set globally
|
# set globally
|
||||||
|
|||||||
@@ -14,11 +14,11 @@ trigger-builder-pack-builder-build() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
local stack="$(plugn trigger buildpack-stack-name "$APP")"
|
local stack="$(plugn trigger buildpack-stack-name "$APP")"
|
||||||
if [[ -z "$stack" ]]; then
|
if [[ -n "$stack" ]]; then
|
||||||
DOKKU_CNB_STACK="$stack"
|
DOKKU_CNB_BUILDER="$stack"
|
||||||
fi
|
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
|
if ! command -v "pack" &>/dev/null; then
|
||||||
dokku_log_fail "Missing pack, install it"
|
dokku_log_fail "Missing pack, install it"
|
||||||
|
|||||||
Reference in New Issue
Block a user