Skip to content

Commit

Permalink
Add PG17 to the build matrix (#75)
Browse files Browse the repository at this point in the history
* Add PG17 to the build matrix

Gonna need these images

* Bump trunk to 15.0

* Remove trailing whitespace

My editor was doing this; fixing to avoid later churn.

* Bump MobilityDB to 1.2.0

* Skip Pg17 build for DW stack

---------

Co-authored-by: Vinícius Miguel <[email protected]>
  • Loading branch information
jasonmp85 and vrmiguel authored Dec 5, 2024
1 parent 14a24b2 commit 30219f2
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 14 deletions.
22 changes: 14 additions & 8 deletions .github/workflows/build_tembo_pg_slim.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
- name: Append PostgreSQL configurations to matrix
id: append_pg_configs
run: |
PG_CONFIGS='[{"pg_version": "14"}, {"pg_version": "15"}, {"pg_version": "16"}]'
PG_CONFIGS='[{"pg_version": "14"}, {"pg_version": "15"}, {"pg_version": "16"}, {"pg_version": "17"}]'
MODIFIED_MATRIX=$(echo $PG_CONFIGS | jq -c '{include: .}')
echo "build_matrix=$MODIFIED_MATRIX" >> $GITHUB_OUTPUT
- name: Determine which tags to publish
Expand Down Expand Up @@ -123,7 +123,7 @@ jobs:
IFS=' ' read -ra TAG_ARRAY <<< "${{ needs.pre-build.outputs.tags }}"
for tag in "${TAG_ARRAY[@]}"; do
docker tag $IMAGE_NAME ${{ secrets.QUAY_REPOSITORY }}/$IMAGE_NAME-$tag
docker push ${{ secrets.QUAY_REPOSITORY }}/$IMAGE_NAME-$tag
docker push ${{ secrets.QUAY_REPOSITORY }}/$IMAGE_NAME-$tag
done
standard-cnpg-build:
Expand Down Expand Up @@ -161,7 +161,7 @@ jobs:
IFS=' ' read -ra TAG_ARRAY <<< "${{ needs.pre-build.outputs.tags }}"
for tag in "${TAG_ARRAY[@]}"; do
docker tag $IMAGE_NAME ${{ secrets.QUAY_REPOSITORY }}/$IMAGE_NAME-$tag
docker push ${{ secrets.QUAY_REPOSITORY }}/$IMAGE_NAME-$tag
docker push ${{ secrets.QUAY_REPOSITORY }}/$IMAGE_NAME-$tag
done
- name: Configure AWS credentials for ECR
uses: aws-actions/configure-aws-credentials@v4
Expand Down Expand Up @@ -226,7 +226,7 @@ jobs:
IFS=' ' read -ra TAG_ARRAY <<< "${{ needs.pre-build.outputs.tags }}"
for tag in "${TAG_ARRAY[@]}"; do
docker tag $IMAGE_NAME ${{ secrets.QUAY_REPOSITORY }}/$IMAGE_NAME-$tag
docker push ${{ secrets.QUAY_REPOSITORY }}/$IMAGE_NAME-$tag
docker push ${{ secrets.QUAY_REPOSITORY }}/$IMAGE_NAME-$tag
done
- name: Configure AWS credentials for ECR
uses: aws-actions/configure-aws-credentials@v4
Expand Down Expand Up @@ -269,36 +269,42 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Build Docker images based on conditions
if: ${{ matrix.pg_version != '17' }}
run: |
IMAGE_NAME=$CONTAINER_NAME:${{ matrix.pg_version }}
docker build ./$CONTAINER_NAME --build-arg PG_VERSION=${{ matrix.pg_version }} --build-arg TAG=${{ needs.pre-build.outputs.short_sha }} -t $IMAGE_NAME
shell: bash
- name: Login to Tembo Quay
if: ${{ matrix.pg_version != '17' }}
uses: docker/login-action@v2
with:
registry: ${{ secrets.QUAY_REPOSITORY }}
username: ${{ secrets.QUAY_USER_TEMBO }}
password: ${{ secrets.QUAY_PASSWORD_TEMBO }}
- name: Push to Quay
if: ${{ matrix.pg_version != '17' }}
shell: bash
run: |
set -xe
IMAGE_NAME=$CONTAINER_NAME:${{ matrix.pg_version }}
IFS=' ' read -ra TAG_ARRAY <<< "${{ needs.pre-build.outputs.tags }}"
for tag in "${TAG_ARRAY[@]}"; do
docker tag $IMAGE_NAME ${{ secrets.QUAY_REPOSITORY }}/$IMAGE_NAME-$tag
docker push ${{ secrets.QUAY_REPOSITORY }}/$IMAGE_NAME-$tag
docker push ${{ secrets.QUAY_REPOSITORY }}/$IMAGE_NAME-$tag
done
- name: Configure AWS credentials for ECR
if: ${{ matrix.pg_version != '17' }}
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ secrets.GHA_IAM_ROLE }}
role-session-name: images-gha-docker-build-and-push
aws-region: "us-east-1"
- name: Install awscli
if: ${{ matrix.pg_version != '17' }}
uses: unfor19/install-aws-cli-action@v1
- name: Push to ECR
shell: bash
if: ${{ matrix.pg_version != '17' }}
run: |
set -xe
IMAGE_NAME=$CONTAINER_NAME:${{ matrix.pg_version }}
Expand Down Expand Up @@ -344,7 +350,7 @@ jobs:
IFS=' ' read -ra TAG_ARRAY <<< "${{ needs.pre-build.outputs.tags }}"
for tag in "${TAG_ARRAY[@]}"; do
docker tag $IMAGE_NAME ${{ secrets.QUAY_REPOSITORY }}/$IMAGE_NAME-$tag
docker push ${{ secrets.QUAY_REPOSITORY }}/$IMAGE_NAME-$tag
docker push ${{ secrets.QUAY_REPOSITORY }}/$IMAGE_NAME-$tag
done
- name: Configure AWS credentials for ECR
uses: aws-actions/configure-aws-credentials@v4
Expand Down Expand Up @@ -409,7 +415,7 @@ jobs:
IFS=' ' read -ra TAG_ARRAY <<< "${{ needs.pre-build.outputs.tags }}"
for tag in "${TAG_ARRAY[@]}"; do
docker tag $IMAGE_NAME ${{ secrets.QUAY_REPOSITORY }}/$IMAGE_NAME-$tag
docker push ${{ secrets.QUAY_REPOSITORY }}/$IMAGE_NAME-$tag
docker push ${{ secrets.QUAY_REPOSITORY }}/$IMAGE_NAME-$tag
done
- name: Configure AWS credentials for ECR
uses: aws-actions/configure-aws-credentials@v4
Expand Down Expand Up @@ -470,5 +476,5 @@ jobs:
IFS=' ' read -ra TAG_ARRAY <<< "${{ needs.pre-build.outputs.tags }}"
for tag in "${TAG_ARRAY[@]}"; do
docker tag $IMAGE_NAME ${{ secrets.QUAY_REPOSITORY }}/$IMAGE_NAME-$tag
docker push ${{ secrets.QUAY_REPOSITORY }}/$IMAGE_NAME-$tag
docker push ${{ secrets.QUAY_REPOSITORY }}/$IMAGE_NAME-$tag
done
2 changes: 1 addition & 1 deletion geo-cnpg/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ RUN wget https://download.osgeo.org/postgis/source/postgis-3.4.0.tar.gz && \

RUN git clone https://github.com/MobilityDB/MobilityDB && \
cd MobilityDB && \
git checkout v1.1.0rc1 && \
git checkout v1.2.0rc1 && \
mkdir build && \
cd build && \
cmake .. && \
Expand Down
4 changes: 2 additions & 2 deletions standard-cnpg/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ ARG TAG=latest

FROM rust:1.74-bookworm as builder

ARG TRUNK_VER=0.12.25
ARG TRUNK_VER=0.15.0

ENV CARGO_REGISTRIES_CRATES_IO_PROTOCOL sparse
RUN cargo install --version $TRUNK_VER pg-trunk
Expand Down Expand Up @@ -89,7 +89,7 @@ RUN git clone https://github.com/aws/aws-sdk-cpp.git && \
git checkout 1.9.263 && \
git submodule update --init --recursive && \
mkdir build && cd build && \
cmake -DBUILD_ONLY="s3;core;config;sts;cognito-identity;transfer;identity-management" -DAUTORUN_UNIT_TESTS=OFF -DCMAKE_CXX_FLAGS=-Wno-error=deprecated-declarations .. && \
cmake -DBUILD_ONLY="s3;core;config;sts;cognito-identity;transfer;identity-management" -DAUTORUN_UNIT_TESTS=OFF -DCMAKE_CXX_FLAGS=-Wno-error=deprecated-declarations .. && \
make -j$(nproc) && \
make install && \
cd ../../../ && rm -rf aws-sdk-cpp
Expand Down
2 changes: 1 addition & 1 deletion standard-cnpg/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Postgres Docker Image for Tembo's Standard Stack

Contains a Dockerfile with trunk, barman-cloud, Postgres 14, 15 or 16 and all extension dependencies installed.
Contains a Dockerfile with trunk, barman-cloud, Postgres 14, 15, 16, or 17 and all extension dependencies installed.

## Versioning

Expand Down
4 changes: 2 additions & 2 deletions tembo-pg-cnpg/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ ARG TAG=latest

FROM rust:1.78-bookworm as builder

ARG TRUNK_VER=0.12.25
ARG TRUNK_VER=0.15.0

ENV CARGO_REGISTRIES_CRATES_IO_PROTOCOL sparse
ENV CARGO_REGISTRIES_CRATES_IO_PROTOCOL sparse
RUN cargo install --version $TRUNK_VER pg-trunk

FROM quay.io/tembo/tembo-pg-slim:${PG_VERSION}-${TAG}
Expand Down

0 comments on commit 30219f2

Please sign in to comment.