Skip to content

Commit

Permalink
Add deprecation messaging to builder:20 (#552)
Browse files Browse the repository at this point in the history
* Add deprecation messaging to builder:20

* API 0.10

Co-authored-by: Ed Morley <501702+edmorley@users.noreply.github.com>

* Drop stacks

Co-authored-by: Ed Morley <501702+edmorley@users.noreply.github.com>

* Use correct url anchor

Co-authored-by: Ed Morley <501702+edmorley@users.noreply.github.com>

* Additional metadata for eol buildpack

* Small refactor for display_error

* Drop newline

Co-authored-by: Ed Morley <501702+edmorley@users.noreply.github.com>

---------

Co-authored-by: Ed Morley <501702+edmorley@users.noreply.github.com>
  • Loading branch information
joshwlewis and edmorley authored Jul 18, 2024
1 parent 6e5bf01 commit 5c6d47e
Show file tree
Hide file tree
Showing 4 changed files with 88 additions and 0 deletions.
25 changes: 25 additions & 0 deletions builder-20/builder.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ run-image = "heroku/heroku:20-cnb"
[lifecycle]
version = "0.20.0"

[[buildpacks]]
id = "heroku/eol-warning"
uri = "./eol-buildpack/"

[[buildpacks]]
id = "heroku/go"
uri = "docker://docker.io/heroku/buildpack-go@sha256:5b9434437add557c6a2cb7ad528480bacbde8a9ca9c5b3750c79ccb7c30afabd"
Expand Down Expand Up @@ -48,6 +52,9 @@ version = "0.20.0"
id = "heroku/procfile"
version = "3.1.2"
optional = true
[[order.group]]
id = "heroku/eol-warning"
version = "1.0.0"

[[order]]
[[order.group]]
Expand All @@ -69,6 +76,9 @@ version = "0.20.0"
id = "heroku/procfile"
version = "3.1.2"
optional = true
[[order.group]]
id = "heroku/eol-warning"
version = "1.0.0"

[[order]]
[[order.group]]
Expand All @@ -78,6 +88,9 @@ version = "0.20.0"
id = "heroku/procfile"
version = "3.1.2"
optional = true
[[order.group]]
id = "heroku/eol-warning"
version = "1.0.0"

[[order]]
[[order.group]]
Expand All @@ -87,6 +100,9 @@ version = "0.20.0"
id = "heroku/procfile"
version = "3.1.2"
optional = true
[[order.group]]
id = "heroku/eol-warning"
version = "1.0.0"

[[order]]
[[order.group]]
Expand All @@ -96,6 +112,9 @@ version = "0.20.0"
id = "heroku/procfile"
version = "3.1.2"
optional = true
[[order.group]]
id = "heroku/eol-warning"
version = "1.0.0"

[[order]]
[[order.group]]
Expand All @@ -105,6 +124,9 @@ version = "0.20.0"
id = "heroku/procfile"
version = "3.1.2"
optional = true
[[order.group]]
id = "heroku/eol-warning"
version = "1.0.0"

[[order]]
[[order.group]]
Expand All @@ -114,3 +136,6 @@ version = "0.20.0"
id = "heroku/procfile"
version = "3.1.2"
optional = true
[[order.group]]
id = "heroku/eol-warning"
version = "1.0.0"
50 changes: 50 additions & 0 deletions builder-20/eol-buildpack/bin/build
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
#!/usr/bin/env bash

set -euo pipefail

ANSI_RED="\033[1;31m"
ANSI_RESET="\033[0m"

function display_error() {
echo >&2
while IFS= read -r line; do
echo -e "${ANSI_RED}${line}${ANSI_RESET}" >&2
done <<< "${1}"
echo >&2
}

# Banner generated via https://www.ascii-art-generator.org/ with "big" font
# and 70 width.
read -r -d '' EOL_MESSAGE <<'EOF' || true
#######################################################################
_ _ ___ ___ ______ ____ _
| | | | |__ \ / _ \ | ____/ __ \| |
| |__ ___ _ __ ___ | | ___ _ ______ ) | | | | | |__ | | | | |
| '_ \ / _ \ '__/ _ \| |/ / | | |______/ /| | | | | __|| | | | |
| | | | __/ | | (_) | <| |_| | / /_| |_| | | |___| |__| | |____
|_| |_|\___|_| \___/|_|\_\\\__,_| |____|\___/ |______\____/|______|
This builder image ('heroku/bulder:20') is deprecated, since it is
based on the deprecated 'heroku/heroku:20' base image.
Starting April 30th, 2025, this image will no longer receive security
updates. Shortly after, this builder will be disabled and made
unavailable.
To continue receiving security updates and avoid interruption, upgrade
to one of our newer builders, such as 'heroku/builder:22' or
'heroku/builder:24':
https://github.com/heroku/cnb-builder-images#available-images
If you are using the Pack CLI, you will need to adjust your '--builder'
CLI argument or change the default builder configuration:
https://buildpacks.io/docs/tools/pack/cli/pack_config_default-builder/
If you are using a third-party platform to deploy your app, check the
platform documentation for instructions on changing the builder.
#######################################################################
EOF

display_error "${EOL_MESSAGE}"

exit 0
3 changes: 3 additions & 0 deletions builder-20/eol-buildpack/bin/detect
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/env bash

exit 0
10 changes: 10 additions & 0 deletions builder-20/eol-buildpack/buildpack.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
api = "0.10"

[buildpack]
id = "heroku/eol-warning"
version = "1.0.0"
name = "heroku/builder:20 End-of-Life Warning"
homepage = "https://github.com/heroku/cnb-builder-images"

[[buildpack.licenses]]
type = "BSD-3-Clause"

0 comments on commit 5c6d47e

Please sign in to comment.