Skip to content

Commit

Permalink
Add support for Heroku-24 (#189)
Browse files Browse the repository at this point in the history
* Add support for Heroku-24

* try checkout v4

* try checkout v4

* take 3

* rebuilt in linux

* rerun from builder

* Update Dockerfile

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

* changelog change

---------

Co-authored-by: Ed Morley <501702+edmorley@users.noreply.github.com>
  • Loading branch information
brahyt-sf and edmorley authored May 17, 2024
1 parent a0c1cbc commit f1c70d3
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 8 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
check_changelog:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Check that CHANGELOG is touched
Expand All @@ -19,15 +19,15 @@ jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: run bats tests
run: docker run -t -v "${PWD}:/code" bats/bats:latest test/*.bats
test-stack:
strategy:
matrix:
stack: [heroku-20, heroku-22]
stack: [heroku-20, heroku-22, heroku-24]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: run stack test
run: bash test/test-stack.sh ${{ matrix.stack }}
1 change: 1 addition & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
* Add validation for PGBOUNCER_URLS
* Add stack tests
* Remove support for Heroku-18
* Add support for Heroku-24

## v0.13.0 (September 9, 2022)
* Update pgbouncer to v1.17.0 for Heroku-18 and Heroku-20 (for parity with Heroku-22)
Expand Down
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
ARG BASE_IMAGE
FROM $BASE_IMAGE
FROM --platform=linux/amd64 $BASE_IMAGE

ARG STACK
USER root
RUN mkdir -p /app /cache /env
COPY . /buildpack
# Sanitize the environment seen by the buildpack, to prevent reliance on
Expand Down
10 changes: 7 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
build: build-heroku-20 build-heroku-22
build: build-heroku-20 build-heroku-22 build-heroku-24

build-heroku-20:
@echo "Building pgbouncer in Docker for heroku-20..."
Expand All @@ -8,6 +8,10 @@ build-heroku-22:
@echo "Building pgbouncer in Docker for heroku-22..."
@docker run -v $(shell pwd):/buildpack --rm -it -e "STACK=heroku-22" -w /buildpack heroku/heroku:22-build support/pgbouncer-build

build-heroku-24:
@echo "Building pgbouncer in Docker for heroku-24..."
@docker run -v $(shell pwd):/buildpack --rm -it -e "STACK=heroku-24" -w /buildpack heroku/heroku:24-build support/pgbouncer-build

shell:
@echo "Opening heroku-22 shell..."
@docker run -v $(shell pwd):/buildpack --rm -it -e "STACK=heroku-22" -e "PORT=5000" -w /buildpack heroku/heroku:22-build bash
@echo "Opening heroku-24 shell..."
@docker run -v $(shell pwd):/buildpack --rm -it -e "STACK=heroku-24" -e "PORT=5000" -w /buildpack heroku/heroku:24-build bash
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ that process.

- Heroku-20: `v1.17.0`
- Heroku-22: `v1.17.0`
- Heroku-24: `v1.17.0`

## Multiple Databases
It is possible to connect to multiple databases through pgbouncer by setting
Expand Down
Binary file added pgbouncer-heroku-24.tgz
Binary file not shown.

0 comments on commit f1c70d3

Please sign in to comment.