diff --git a/docs/deployment/builders/cloud-native-buildpacks.md b/docs/deployment/builders/cloud-native-buildpacks.md index 83a3ec407..f6a3ebb83 100644 --- a/docs/deployment/builders/cloud-native-buildpacks.md +++ b/docs/deployment/builders/cloud-native-buildpacks.md @@ -14,8 +14,8 @@ buildpacks:set-property [--global|] # Set or clear a buildpa Cloud Native Buildpacks are an evolution over the Buildpacks technology provided by the Herokuish builder. See the [herokuish buildpacks documentation](/docs/deployment/builders/herokuish-buildpacks.md) for more information on how to clear buildpack build cache for an application. -> [!WARNING] -> This functionality uses the `pack` cli from the [Cloud Native Buildpacks](https://buildpacks.io) project to build apps. As the integration is experimental in Dokku, it is likely to change over time. +> [!NOTE] +> This functionality uses the `pack` cli from the [Cloud Native Buildpacks](https://buildpacks.io) project to build apps. ## Usage @@ -27,7 +27,7 @@ Builds will proceed with the `pack` cli for the app from then on. ### Caveats -As this functionality is highly experimental, there are a number of caveats. Please note that not all issues are listed below. +While pack is well-supported in Dokku, there are a number of caveats. Please note that not all issues are listed below. - Specifying specific buildpacks is not currently possible. - A future release will add support for specifying buildpacks via the `buildpacks` plugin. @@ -41,16 +41,7 @@ As this functionality is highly experimental, there are a number of caveats. Ple ### Detection -This builder will be auto-detected in either the following cases: - -- The `DOKKU_CNB_EXPERIMENTAL` app environment variable is set to `1`. - - ```shell - dokku config:set --no-restart node-js-app DOKKU_CNB_EXPERIMENTAL=1 - ``` - -- A `project.toml` file exists in the root of the app repository. - - This file is consumed by `pack-cli` and used to describe how the app is built. +This builder will be auto-detected if a `project.toml` file exists in the root of the app repository. This file is consumed by `pack-cli` and used to describe how the app is built. The builder can also be specified via the `builder:set` command: diff --git a/plugins/builder-pack/builder-detect b/plugins/builder-pack/builder-detect index d269c11dc..4202263ef 100755 --- a/plugins/builder-pack/builder-detect +++ b/plugins/builder-pack/builder-detect @@ -12,11 +12,6 @@ trigger-builder-pack-builder-detect() { echo "pack" return fi - - if [[ "$(config_get "$APP" DOKKU_CNB_EXPERIMENTAL || true)" == "1" ]]; then - echo "pack" - return - fi } trigger-builder-pack-builder-detect "$@" diff --git a/plugins/common/functions b/plugins/common/functions index ea1dcfe06..9a7e12c84 100755 --- a/plugins/common/functions +++ b/plugins/common/functions @@ -665,11 +665,6 @@ dokku_receive() { docker_cleanup "$APP" - local DOKKU_CNB_EXPERIMENTAL="$(config_get "$APP" DOKKU_CNB_EXPERIMENTAL || true)" - if [[ "$DOKKU_CNB_EXPERIMENTAL" == "1" ]]; then - IMAGE_SOURCE_TYPE="pack" - fi - plugn trigger builder-set-property "$APP" "detected" "$IMAGE_SOURCE_TYPE" if ! dokku_build "$APP" "$IMAGE_SOURCE_TYPE" "$TMP_WORK_DIR"; then return 1 diff --git a/tests/unit/app-json.bats b/tests/unit/app-json.bats index acdd54854..ba8325f6a 100644 --- a/tests/unit/app-json.bats +++ b/tests/unit/app-json.bats @@ -94,7 +94,12 @@ teardown() { echo "status: $status" assert_success - run /bin/bash -c "dokku config:set --no-restart $TEST_APP DOKKU_CNB_EXPERIMENTAL=1 SECRET_KEY=fjdkslafjdk" + run /bin/bash -c "dokku config:set --no-restart $TEST_APP SECRET_KEY=fjdkslafjdk" + echo "output: $output" + echo "status: $status" + assert_success + + run /bin/bash -c "dokku builder:set $TEST_APP selected pack" echo "output: $output" echo "status: $status" assert_success diff --git a/tests/unit/builder.bats b/tests/unit/builder.bats index 8d6907fd6..6cbaa790e 100644 --- a/tests/unit/builder.bats +++ b/tests/unit/builder.bats @@ -99,19 +99,6 @@ teardown() { echo "output: $output" echo "status: $status" assert_success - - # test DOKKU_CNB_EXPERIMENTAL env var - run /bin/bash -c "dokku config:set $TEST_APP DOKKU_CNB_EXPERIMENTAL=1" - echo "output: $output" - echo "status: $status" - assert_success - - chown -R dokku:dokku "$TMP" - run /bin/bash -c "dokku plugin:trigger builder-detect $TEST_APP $TMP" - echo "output: $output" - echo "status: $status" - assert_success - assert_line 0 "pack" } @test "(builder) builder-detect [dockerfile]" { diff --git a/tests/unit/ps-cnb.bats b/tests/unit/ps-cnb.bats index c24044428..25fe17e42 100644 --- a/tests/unit/ps-cnb.bats +++ b/tests/unit/ps-cnb.bats @@ -17,7 +17,7 @@ teardown() { } @test "(ps) cnb env vars" { - run /bin/bash -c "dokku config:set $TEST_APP DOKKU_CNB_EXPERIMENTAL=1" + run /bin/bash -c "dokku config:set $TEST_APP APP_RESPECTS_ENV_VARS=1" echo "output: $output" echo "status: $status" assert_success @@ -31,5 +31,5 @@ teardown() { echo "output: $output" echo "status: $status" assert_success - assert_output_contains '"DOKKU_CNB_EXPERIMENTAL": "1"' + assert_output_contains '"APP_RESPECTS_ENV_VARS": "1"' } diff --git a/tests/unit/run_1.bats b/tests/unit/run_1.bats index 91574f126..913b6de2c 100644 --- a/tests/unit/run_1.bats +++ b/tests/unit/run_1.bats @@ -68,7 +68,12 @@ teardown() { echo "status: $status" assert_success - run /bin/bash -c "dokku config:set --no-restart $TEST_APP DOKKU_CNB_EXPERIMENTAL=1 SECRET_KEY=fjdkslafjdk" + run /bin/bash -c "dokku config:set --no-restart $TEST_APP SECRET_KEY=fjdkslafjdk" + echo "output: $output" + echo "status: $status" + assert_success + + run /bin/bash -c "dokku builder:set $TEST_APP selected pack" echo "output: $output" echo "status: $status" assert_success