diff --git a/.github/workflows/build-test-publish.yml b/.github/workflows/build-test-publish.yml index 59e00be9..dcd4c408 100644 --- a/.github/workflows/build-test-publish.yml +++ b/.github/workflows/build-test-publish.yml @@ -25,7 +25,7 @@ jobs: strategy: fail-fast: false matrix: - builder: ["buildpacks-20", "builder-classic-22", "builder-20", "builder-22", "salesforce-functions", "builder-24"] + builder: ["builder-20", "builder-22", "salesforce-functions", "builder-24"] arch: ["amd64"] include: - builder: "builder-24" @@ -70,13 +70,10 @@ jobs: strategy: fail-fast: false matrix: - builder: ["buildpacks-20", "builder-classic-22", "builder-20", "builder-22"] + builder: ["builder-20", "builder-22"] language: ["go", "gradle", "java", "node-js", "php", "python", "ruby", "scala"] arch: ["amd64"] include: - - builder: builder-classic-22 - language: clojure - arch: amd64 - builder: builder-24 language: go arch: amd64 @@ -188,12 +185,6 @@ jobs: fail-fast: false matrix: include: - - builder: buildpacks-20 - tag_public: heroku/buildpacks:20 - arch: amd64 - - builder: builder-classic-22 - tag_public: heroku/builder-classic:22 - arch: amd64 - builder: builder-20 tag_public: heroku/builder:20 arch: amd64 diff --git a/Makefile b/Makefile index c2308d9e..44ef1785 100644 --- a/Makefile +++ b/Makefile @@ -3,15 +3,7 @@ SHELL=/bin/bash -o pipefail build: - @pack builder create heroku/buildpacks:20 --config buildpacks-20/builder.toml --pull-policy always @pack builder create heroku/builder:20 --config builder-20/builder.toml --pull-policy always @pack builder create heroku/builder:22 --config builder-22/builder.toml --pull-policy always - @pack builder create heroku/builder-classic:22 --config builder-classic-22/builder.toml --pull-policy always + @pack builder create heroku/builder:24 --config builder-24/builder.toml --pull-policy always @pack builder create salesforce-functions --config salesforce-functions/builder.toml --pull-policy always - -# The salesforce-functions image isn't published to Docker Hub, so is intentionally absent here. -publish: build - @docker push heroku/buildpacks:20 - @docker push heroku/builder:20 - @docker push heroku/builder:22 - @docker push heroku/builder-classic:22 diff --git a/README.md b/README.md index 5e5c6711..7916b20e 100644 --- a/README.md +++ b/README.md @@ -7,29 +7,22 @@ This repository is responsible for building and publishing builder images for [Heroku's Cloud Native Buildpacks project](https://github.com/heroku/buildpacks), which is in preview. -A builder image is a packaged set of buildpacks, base images and a [`lifecycle`](https://github.com/buildpacks/lifecycle) -binary that orchestrates the build. These builder images use Heroku's [base images](https://github.com/heroku/base-images) -as their base. +A builder image is a packaged set of buildpacks, base images and a [lifecycle](https://github.com/buildpacks/lifecycle) +binary that orchestrates the build. For more information, see: [What is a builder?](https://buildpacks.io/docs/for-platform-operators/concepts/builder/) -For more information, see: [What is a builder?](https://buildpacks.io/docs/for-platform-operators/concepts/builder/) +These builder images use the build and run variants of Heroku's [base images](https://github.com/heroku/base-images) +during the build and as the default base of the built app image, respectively. For a list of the packages contained +in each base image, see [this Dev Center article](https://devcenter.heroku.com/articles/stack-packages). ## Available images -> [!WARNING] -> The `heroku/buildpacks:*` and `heroku/builder-classic:*` builder image variants have been sunset, -> since they use classic Heroku buildpacks shimmed for compatibility with the CNB specification, -> rather than Heroku's next-generation Cloud Native Buildpacks. +| Builder Image | OS | Supported Architectures | Default Run Image | Lifecycle Version | Status | +|-----------------------------------|--------------|-------------------------|-------------------------------------|-------------------|----------------| +| [heroku/builder:20][builder-tags] | Ubuntu 20.04 | AMD64 | [heroku/heroku:20-cnb][heroku-tags] | 0.19.3 | Available | +| [heroku/builder:22][builder-tags] | Ubuntu 22.04 | AMD64 | [heroku/heroku:22-cnb][heroku-tags] | 0.19.3 | Recommended | +| [heroku/builder:24][builder-tags] | Ubuntu 24.04 | AMD64 + ARM64 | [heroku/heroku:24][heroku-tags] | 0.19.3 | In Development | -| Builder Image | Base Build Image | Base Run Image | Lifecycle Version | Buildpack Types | Status | -|-----------------------------------------------------|---------------------------------------------|---------------------------------------|-------------------|------------------|----------------| -| [`heroku/buildpacks:18`][buildpacks-tags] | [`heroku/heroku:18-cnb-build`][heroku-tags] | [`heroku/heroku:18-cnb`][heroku-tags] | 0.16.1 | Shimmed + Native | End-of-life | -| [`heroku/buildpacks:20`][buildpacks-tags] | [`heroku/heroku:20-cnb-build`][heroku-tags] | [`heroku/heroku:20-cnb`][heroku-tags] | 0.17.6 | Shimmed + Native | End-of-life | -| [`heroku/builder-classic:22`][builder-classic-tags] | [`heroku/heroku:22-cnb-build`][heroku-tags] | [`heroku/heroku:22-cnb`][heroku-tags] | 0.17.6 | Shimmed | End-of-life | -| [`heroku/builder:20`][builder-tags] | [`heroku/heroku:20-cnb-build`][heroku-tags] | [`heroku/heroku:20-cnb`][heroku-tags] | 0.19.3 | Native | Available | -| [`heroku/builder:22`][builder-tags] | [`heroku/heroku:22-cnb-build`][heroku-tags] | [`heroku/heroku:22-cnb`][heroku-tags] | 0.19.3 | Native | Recommended | -| [`heroku/builder:24`][builder-tags] | [`heroku/heroku:24-build`][heroku-tags] | [`heroku/heroku:24`][heroku-tags] | 0.19.3 | Native | In Development | - -The builder images above include buildpack support for the following languages: Go, Java, Node.js, PHP, Python, Ruby & Scala. The `heroku/builder-classic:22` builder image variant additionally supports Clojure. +The builder images above (excluding `heroku/builder:24`, whilst it's in development) include buildpack support for the following languages: Go, Java, Node.js, PHP, Python, Ruby & Scala. Check the [lifecycle API version support matrix](https://github.com/buildpacks/lifecycle#supported-apis) to determine which Platform and Buildpack API versions are compatible with the `lifecycle` version included in each builder. @@ -64,12 +57,10 @@ For buildpack-specific bugs or feature requests, file an issue against the appro - https://github.com/heroku/buildpacks-ruby - https://github.com/heroku/buildpacks-procfile -For base image related bugs or feature requests (for example requests for additional system libraries), use: +For base image related bugs or feature requests (such as requests for additional system libraries), use: https://github.com/heroku/base-images For any other bug or feature request, file an issue in this repository. [builder-tags]: https://hub.docker.com/r/heroku/builder/tags -[builder-classic-tags]: https://hub.docker.com/r/heroku/builder-classic/tags -[buildpacks-tags]: https://hub.docker.com/r/heroku/buildpacks/tags [heroku-tags]: https://hub.docker.com/r/heroku/heroku/tags diff --git a/builder-classic-22/builder.toml b/builder-classic-22/builder.toml deleted file mode 100644 index cf0be958..00000000 --- a/builder-classic-22/builder.toml +++ /dev/null @@ -1,167 +0,0 @@ -description = "[DEPRECATED] Heroku-22 (Ubuntu 22.04) base image with shimmed classic Heroku buildpacks. Use 'heroku/builder' instead." - -[stack] -id = "heroku-22" -build-image = "heroku/heroku:22-cnb-build" -run-image = "heroku/heroku:22-cnb" - -[lifecycle] -# We have to use an older lifecycle version in this builder image since lifecycle 0.18.0 -# dropped support for Buildpack API versions <0.7, and cnb-shim is currently using v0.4: -# https://github.com/heroku/cnb-shim/issues/69 -version = "0.17.6" - -[[buildpacks]] - id = "heroku/builder-eol-warning" - uri = "./end-of-life-buildpack/" - -[[buildpacks]] - id = "heroku/clojure" - uri = "https://cnb-shim.herokuapp.com/v1/heroku/clojure?version=0.0.0&name=Heroku+Clojure+(Shimmed)" - -[[buildpacks]] - id = "heroku/go" - uri = "https://cnb-shim.herokuapp.com/v1/heroku/go?version=0.0.0&name=Heroku+Go+(Shimmed)" - -[[buildpacks]] - id = "heroku/gradle" - uri = "https://cnb-shim.herokuapp.com/v1/heroku/gradle?version=0.0.0&name=Heroku+Gradle+(Shimmed)" - -[[buildpacks]] - id = "heroku/java" - uri = "https://cnb-shim.herokuapp.com/v1/heroku/java?version=0.0.0&name=Heroku+Java+(Shimmed)" - -[[buildpacks]] - id = "heroku/nodejs" - uri = "https://cnb-shim.herokuapp.com/v1/heroku/nodejs?version=0.0.0&name=Heroku+Node.js+(Shimmed)" - -[[buildpacks]] - id = "heroku/php" - uri = "https://cnb-shim.herokuapp.com/v1/heroku/php?version=0.0.0&name=Heroku+PHP+(Shimmed)" - -# We have to use Procfile CNB v2.0.2 in this builder image, since cnb-shim isn't compatible with -# the direct process mode used in newer Procfile CNB: -# https://github.com/heroku/cnb-shim/issues/74 -[[buildpacks]] - id = "heroku/procfile" - uri = "docker://docker.io/heroku/buildpack-procfile@sha256:2549eee29b64c5dc063a3966c65baf1f264389645f54d416a320aa9e20b09592" - -[[buildpacks]] - id = "heroku/python" - uri = "https://cnb-shim.herokuapp.com/v1/heroku/python?version=0.0.0&name=Heroku+Python+(Shimmed)" - -[[buildpacks]] - id = "heroku/ruby" - uri = "https://cnb-shim.herokuapp.com/v1/heroku/ruby?version=0.0.0&name=Heroku+Ruby+(Shimmed)" - -[[buildpacks]] - id = "heroku/scala" - uri = "https://cnb-shim.herokuapp.com/v1/heroku/scala?version=0.0.0&name=Heroku+Scala+(Shimmed)" - -[[order]] - [[order.group]] - id = "heroku/builder-eol-warning" - version = "2.0.0" - [[order.group]] - id = "heroku/ruby" - version = "0.0.0" - [[order.group]] - id = "heroku/procfile" - version = "2.0.2" - optional = true - -[[order]] - [[order.group]] - id = "heroku/builder-eol-warning" - version = "2.0.0" - [[order.group]] - id = "heroku/clojure" - version = "0.0.0" - [[order.group]] - id = "heroku/procfile" - version = "2.0.2" - optional = true - -[[order]] - [[order.group]] - id = "heroku/builder-eol-warning" - version = "2.0.0" - [[order.group]] - id = "heroku/python" - version = "0.0.0" - [[order.group]] - id = "heroku/procfile" - version = "2.0.2" - optional = true - -[[order]] - [[order.group]] - id = "heroku/builder-eol-warning" - version = "2.0.0" - [[order.group]] - id = "heroku/java" - version = "0.0.0" - [[order.group]] - id = "heroku/procfile" - version = "2.0.2" - optional = true - -[[order]] - [[order.group]] - id = "heroku/builder-eol-warning" - version = "2.0.0" - [[order.group]] - id = "heroku/gradle" - version = "0.0.0" - [[order.group]] - id = "heroku/procfile" - version = "2.0.2" - optional = true - -[[order]] - [[order.group]] - id = "heroku/builder-eol-warning" - version = "2.0.0" - [[order.group]] - id = "heroku/scala" - version = "0.0.0" - [[order.group]] - id = "heroku/procfile" - version = "2.0.2" - optional = true - -[[order]] - [[order.group]] - id = "heroku/builder-eol-warning" - version = "2.0.0" - [[order.group]] - id = "heroku/php" - version = "0.0.0" - [[order.group]] - id = "heroku/procfile" - version = "2.0.2" - optional = true - -[[order]] - [[order.group]] - id = "heroku/builder-eol-warning" - version = "2.0.0" - [[order.group]] - id = "heroku/go" - version = "0.0.0" - [[order.group]] - id = "heroku/procfile" - version = "2.0.2" - optional = true - -[[order]] - [[order.group]] - id = "heroku/builder-eol-warning" - version = "2.0.0" - [[order.group]] - id = "heroku/nodejs" - version = "0.0.0" - [[order.group]] - id = "heroku/procfile" - version = "2.0.2" - optional = true diff --git a/builder-classic-22/end-of-life-buildpack/bin/build b/builder-classic-22/end-of-life-buildpack/bin/build deleted file mode 100755 index cde7d6d0..00000000 --- a/builder-classic-22/end-of-life-buildpack/bin/build +++ /dev/null @@ -1,58 +0,0 @@ -#!/usr/bin/env bash - -set -euo pipefail - -ENV_DIR="${2}/env" -ENV_VAR_NAME='ALLOW_EOL_SHIMMED_BUILDER' -ALLOW_BUILD="$(cat "${ENV_DIR}/${ENV_VAR_NAME}" 2> /dev/null || true)" - -ANSI_RED="\033[1;31m" -ANSI_RESET="\033[0m" - -function display_error() { - echo >&2 - # We have to ANSI wrap each line separately to prevent breakage if line prefixes are added - # later (such as when the builder is untrusted, or when Git adds the "remote:" prefix). - while IFS= read -r line; do - echo -e "${ANSI_RED}${line}${ANSI_RESET}" >&2 - done <<< "${1}" - echo >&2 -} - -if [[ "${ALLOW_BUILD}" == "1" ]]; then - MSG_PREFIX="WARNING" - MSG_FOOTER="Allowing the build to continue since ${ENV_VAR_NAME} is set." - EXIT_CODE=0 -else - MSG_PREFIX="ERROR" - MSG_FOOTER="To ignore this error, set the env var ${ENV_VAR_NAME} to 1." - EXIT_CODE=1 -fi - -display_error "$(cat <' - -If you are using a third-party platform to deploy your app, check their -documentation for how to adjust the builder image used for your build. - -${MSG_FOOTER} - -####################################################################### -EOF -)" - -exit ${EXIT_CODE} diff --git a/builder-classic-22/end-of-life-buildpack/bin/detect b/builder-classic-22/end-of-life-buildpack/bin/detect deleted file mode 100755 index 0fdcf091..00000000 --- a/builder-classic-22/end-of-life-buildpack/bin/detect +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env bash - -exit 0 diff --git a/builder-classic-22/end-of-life-buildpack/buildpack.toml b/builder-classic-22/end-of-life-buildpack/buildpack.toml deleted file mode 100644 index 5a4794b8..00000000 --- a/builder-classic-22/end-of-life-buildpack/buildpack.toml +++ /dev/null @@ -1,13 +0,0 @@ -api = "0.9" - -[buildpack] - id = "heroku/builder-eol-warning" - version = "2.0.0" - name = "Builder End-of-Life Warning" - homepage = "https://github.com/heroku/cnb-builder-images" - -[[buildpack.licenses]] - type = "BSD-3-Clause" - -[[stacks]] - id = "*" diff --git a/buildpacks-20/builder.toml b/buildpacks-20/builder.toml deleted file mode 100644 index 352f278d..00000000 --- a/buildpacks-20/builder.toml +++ /dev/null @@ -1,139 +0,0 @@ -description = "[DEPRECATED] Heroku-20 (Ubuntu 20.04) base image with a mixture of shimmed classic Heroku buildpacks and native CNBs. Use 'heroku/builder' instead." - -[stack] -id = "heroku-20" -build-image = "heroku/heroku:20-cnb-build" -run-image = "heroku/heroku:20-cnb" - -[lifecycle] -# We have to use an older lifecycle version in this builder image since lifecycle 0.18.0 -# dropped support for Buildpack API versions <0.7, and cnb-shim is currently using v0.4: -# https://github.com/heroku/cnb-shim/issues/69 -version = "0.17.6" - -[[buildpacks]] - id = "heroku/builder-eol-warning" - uri = "./end-of-life-buildpack/" - -[[buildpacks]] - id = "heroku/go" - uri = "https://cnb-shim.herokuapp.com/v1/heroku/go?version=0.0.0&name=Heroku+Go+(Shimmed)" - -[[buildpacks]] - id = "heroku/gradle" - uri = "https://cnb-shim.herokuapp.com/v1/heroku/gradle?version=0.0.0&name=Heroku+Gradle+(Shimmed)" - -[[buildpacks]] - id = "heroku/java" - uri = "docker://docker.io/heroku/buildpack-java@sha256:b8a2ececd099a9e566207ccb376ed63212a08d2598c574992eba7b0e6782a9f0" - -[[buildpacks]] - id = "heroku/nodejs" - uri = "docker://docker.io/heroku/buildpack-nodejs@sha256:9f4779f8dc4f3f141d731343a36d32d26745efd65e62dcb052d443213452f0cc" - -[[buildpacks]] - id = "heroku/php" - uri = "https://cnb-shim.herokuapp.com/v1/heroku/php?version=0.0.0&name=Heroku+PHP+(Shimmed)" - -# We have to use Procfile CNB v2.0.2 in this builder image, since cnb-shim isn't compatible with -# the direct process mode used in newer Procfile CNB: -# https://github.com/heroku/cnb-shim/issues/74 -[[buildpacks]] - id = "heroku/procfile" - uri = "docker://docker.io/heroku/buildpack-procfile@sha256:2549eee29b64c5dc063a3966c65baf1f264389645f54d416a320aa9e20b09592" - -[[buildpacks]] - id = "heroku/python" - uri = "https://cnb-shim.herokuapp.com/v1/heroku/python?version=0.0.0&name=Heroku+Python+(Shimmed)" - -[[buildpacks]] - id = "heroku/ruby" - uri = "https://cnb-shim.herokuapp.com/v1/heroku/ruby?version=0.0.0&name=Heroku+Ruby+(Shimmed)" - -[[buildpacks]] - id = "heroku/scala" - uri = "https://cnb-shim.herokuapp.com/v1/heroku/scala?version=0.0.0&name=Heroku+Scala+(Shimmed)" - -[[order]] - [[order.group]] - id = "heroku/builder-eol-warning" - version = "2.0.0" - [[order.group]] - id = "heroku/ruby" - version = "0.0.0" - [[order.group]] - id = "heroku/procfile" - version = "2.0.2" - optional = true - -[[order]] - [[order.group]] - id = "heroku/builder-eol-warning" - version = "2.0.0" - [[order.group]] - id = "heroku/python" - version = "0.0.0" - [[order.group]] - id = "heroku/procfile" - version = "2.0.2" - optional = true - -[[order]] - [[order.group]] - id = "heroku/builder-eol-warning" - version = "2.0.0" - [[order.group]] - id = "heroku/scala" - version = "0.0.0" - [[order.group]] - id = "heroku/procfile" - version = "2.0.2" - optional = true - -[[order]] - [[order.group]] - id = "heroku/builder-eol-warning" - version = "2.0.0" - [[order.group]] - id = "heroku/php" - version = "0.0.0" - [[order.group]] - id = "heroku/procfile" - version = "2.0.2" - optional = true - -[[order]] - [[order.group]] - id = "heroku/builder-eol-warning" - version = "2.0.0" - [[order.group]] - id = "heroku/go" - version = "0.0.0" - [[order.group]] - id = "heroku/procfile" - version = "2.0.2" - optional = true - -[[order]] - [[order.group]] - id = "heroku/builder-eol-warning" - version = "2.0.0" - [[order.group]] - id = "heroku/nodejs" - version = "3.0.6" - [[order.group]] - id = "heroku/procfile" - version = "2.0.2" - optional = true - -[[order]] - [[order.group]] - id = "heroku/builder-eol-warning" - version = "2.0.0" - [[order.group]] - id = "heroku/java" - version = "4.1.1" - [[order.group]] - id = "heroku/procfile" - version = "2.0.2" - optional = true diff --git a/buildpacks-20/end-of-life-buildpack/bin/build b/buildpacks-20/end-of-life-buildpack/bin/build deleted file mode 100755 index d1f6ae94..00000000 --- a/buildpacks-20/end-of-life-buildpack/bin/build +++ /dev/null @@ -1,58 +0,0 @@ -#!/usr/bin/env bash - -set -euo pipefail - -ENV_DIR="${2}/env" -ENV_VAR_NAME='ALLOW_EOL_SHIMMED_BUILDER' -ALLOW_BUILD="$(cat "${ENV_DIR}/${ENV_VAR_NAME}" 2> /dev/null || true)" - -ANSI_RED="\033[1;31m" -ANSI_RESET="\033[0m" - -function display_error() { - echo >&2 - # We have to ANSI wrap each line separately to prevent breakage if line prefixes are added - # later (such as when the builder is untrusted, or when Git adds the "remote:" prefix). - while IFS= read -r line; do - echo -e "${ANSI_RED}${line}${ANSI_RESET}" >&2 - done <<< "${1}" - echo >&2 -} - -if [[ "${ALLOW_BUILD}" == "1" ]]; then - MSG_PREFIX="WARNING" - MSG_FOOTER="Allowing the build to continue since ${ENV_VAR_NAME} is set." - EXIT_CODE=0 -else - MSG_PREFIX="ERROR" - MSG_FOOTER="To ignore this error, set the env var ${ENV_VAR_NAME} to 1." - EXIT_CODE=1 -fi - -display_error "$(cat <' - -If you are using a third-party platform to deploy your app, check their -documentation for how to adjust the builder image used for your build. - -${MSG_FOOTER} - -####################################################################### -EOF -)" - -exit ${EXIT_CODE} diff --git a/buildpacks-20/end-of-life-buildpack/bin/detect b/buildpacks-20/end-of-life-buildpack/bin/detect deleted file mode 100755 index 0fdcf091..00000000 --- a/buildpacks-20/end-of-life-buildpack/bin/detect +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env bash - -exit 0 diff --git a/buildpacks-20/end-of-life-buildpack/buildpack.toml b/buildpacks-20/end-of-life-buildpack/buildpack.toml deleted file mode 100644 index 5a4794b8..00000000 --- a/buildpacks-20/end-of-life-buildpack/buildpack.toml +++ /dev/null @@ -1,13 +0,0 @@ -api = "0.9" - -[buildpack] - id = "heroku/builder-eol-warning" - version = "2.0.0" - name = "Builder End-of-Life Warning" - homepage = "https://github.com/heroku/cnb-builder-images" - -[[buildpack.licenses]] - type = "BSD-3-Clause" - -[[stacks]] - id = "*"