Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce builder-24 with multi-arch support #504

Merged
merged 23 commits into from
May 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
91 changes: 82 additions & 9 deletions .github/workflows/build-test-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,26 @@ defaults:
jobs:

create:
runs-on: ubuntu-22.04
runs-on: ${{ matrix.arch == 'arm64' && 'pub-hk-ubuntu-22.04-arm-large' || 'ubuntu-22.04' }}
strategy:
fail-fast: false
matrix:
builder: ["buildpacks-20", "builder-classic-22", "builder-20", "builder-22", "salesforce-functions"]
builder: ["buildpacks-20", "builder-classic-22", "builder-20", "builder-22", "salesforce-functions", "builder-24"]
arch: ["amd64"]
include:
- builder: "builder-24"
arch: "arm64"
steps:
- name: Checkout
uses: actions/checkout@v4
# Docker is not installed on GHA arm runners
- name: Setup Docker
if: matrix.arch == 'arm64'
run: |
bin/setup_docker_ci
sudo usermod -aG docker $USER
sudo apt-get install acl
sudo setfacl --modify user:$USER:rw /var/run/docker.sock
- name: Install Pack CLI
uses: buildpacks/github-actions/setup-pack@v5.6.0
- name: Create builder image
Expand All @@ -49,21 +61,41 @@ jobs:
- name: Save Docker images to the cache
uses: actions/cache/save@v4
with:
key: ${{ github.run_id}}-${{ matrix.builder }}
key: ${{ github.run_id}}-${{ matrix.builder }}-${{ matrix.arch }}
path: images.tar.zst

test-guides:
runs-on: ubuntu-22.04
runs-on: ${{ matrix.arch == 'arm64' && 'pub-hk-ubuntu-22.04-arm-large' || 'ubuntu-22.04' }}
needs: create
strategy:
fail-fast: false
matrix:
builder: ["buildpacks-20", "builder-classic-22", "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
- builder: builder-24
language: go
arch: arm64
steps:
# Checkout is needed only for the setup_docker_ci script
- name: Checkout
uses: actions/checkout@v4
if: matrix.arch == 'arm64'
# Docker is not installed on GHA arm runners
- name: Setup Docker
if: matrix.arch == 'arm64'
run: |
bin/setup_docker_ci
sudo usermod -aG docker $USER
sudo apt-get install acl
sudo setfacl --modify user:$USER:rw /var/run/docker.sock
- name: Checkout getting started guide
uses: actions/checkout@v4
with:
Expand All @@ -75,7 +107,7 @@ jobs:
uses: actions/cache/restore@v4
with:
fail-on-cache-miss: true
key: ${{ github.run_id}}-${{ matrix.builder }}
key: ${{ github.run_id}}-${{ matrix.builder }}-${{ matrix.arch }}
path: images.tar.zst
env:
SEGMENT_DOWNLOAD_TIMEOUT_MINS: 1
Expand Down Expand Up @@ -121,7 +153,7 @@ jobs:
uses: actions/cache/restore@v4
with:
fail-on-cache-miss: true
key: ${{ github.run_id}}-${{ matrix.builder }}
key: ${{ github.run_id}}-${{ matrix.builder }}-amd64
path: images.tar.zst
env:
SEGMENT_DOWNLOAD_TIMEOUT_MINS: 1
Expand All @@ -142,8 +174,8 @@ jobs:
exit 1
fi

publish:
runs-on: ubuntu-22.04
publish-images:
runs-on: ${{ matrix.arch == 'arm64' && 'pub-hk-ubuntu-22.04-arm-large' || 'ubuntu-22.04' }}
joshwlewis marked this conversation as resolved.
Show resolved Hide resolved
if: success() && github.ref == 'refs/heads/main'
needs: ["test-guides", "test-functions"]
strategy:
Expand All @@ -152,20 +184,43 @@ jobs:
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
- builder: builder-22
tag_public: heroku/builder:22
arch: amd64
- builder: salesforce-functions
tag_private: heroku-22:builder-functions
arch: amd64
- builder: builder-24
tag_public: heroku/builder:24_linux-amd64
arch: amd64
- builder: builder-24
tag_public: heroku/builder:24_linux-arm64
arch: arm64
steps:
# Checkout is needed only for the setup_docker_ci script
- name: Checkout
uses: actions/checkout@v4
if: matrix.arch == 'arm64'
# Docker is not installed on GHA arm runners
- name: Setup Docker
if: matrix.arch == 'arm64'
run: |
bin/setup_docker_ci
sudo usermod -aG docker $USER
sudo apt-get install acl
sudo setfacl --modify user:$USER:rw /var/run/docker.sock
- name: Restore Docker images from the cache
uses: actions/cache/restore@v4
with:
fail-on-cache-miss: true
key: ${{ github.run_id}}-${{ matrix.builder }}
key: ${{ github.run_id}}-${{ matrix.builder }}-${{ matrix.arch }}
path: images.tar.zst
env:
SEGMENT_DOWNLOAD_TIMEOUT_MINS: 1
Expand Down Expand Up @@ -198,3 +253,21 @@ jobs:
set -x
docker tag '${{ matrix.builder }}' "${PRIVATE_IMAGE_URI}"
docker push "${PRIVATE_IMAGE_URI}"

publish-indices:
runs-on: ubuntu-22.04
needs: publish-images
strategy:
fail-fast: false
matrix:
include:
- manifests: "heroku/builder:24_linux-amd64 heroku/builder:24_linux-arm64"
tag_public: "heroku/builder:24"
steps:
- name: Log in to Docker Hub
if: matrix.tag_public != ''
run: echo '${{ secrets.DOCKER_HUB_TOKEN }}' | docker login -u '${{ secrets.DOCKER_HUB_USER }}' --password-stdin
- name: Create and push manifest lists
run: |
docker manifest create "${{ matrix.tag_public }}" ${{ matrix.manifests }}
docker manifest push "${{ matrix.tag_public }}"
15 changes: 8 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,14 @@ For more information, see: [What is a builder?](https://buildpacks.io/docs/for-p
> since they use classic Heroku buildpacks shimmed for compatibility with the CNB specification,
> rather than Heroku's next-generation Cloud Native Buildpacks.

| 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 |
| 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.
joshwlewis marked this conversation as resolved.
Show resolved Hide resolved

Expand Down
Loading