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

move extension to ./pgmq-extension #266

Merged
merged 12 commits into from
Jun 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
24 changes: 12 additions & 12 deletions .github/workflows/extension_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,21 @@ name: PGMQ Extension
defaults:
run:
shell: bash
working-directory: ./
working-directory: ./pgmq-extension

on:
pull_request:
branches:
- main
paths-ignore:
- "pgmq-rs/**"
- "tembo-pgmq-python/**"
paths:
- "pgmq-extension/**"
- ".github/workflows/extension_ci.yml"
push:
branches:
- main
paths-ignore:
- "pgmq-rs/**"
- "tembo-pgmq-python/**"
paths:
- "pgmq-extension/**"
- ".github/workflows/extension_ci.yml"
release:
types:
- created
Expand All @@ -33,6 +33,7 @@ jobs:
container: pgxn/pgxn-tools
steps:
- run: pg-start ${{ matrix.pg }}
working-directory: ./
- uses: actions/checkout@v4
- run: pgxn install 'pg_partman=4.7.3'
- run: pg-build-test
Expand All @@ -53,7 +54,7 @@ jobs:
with:
prefix-key: "pgmq-extension-test"
workspaces: |
pgmq/extension
pgmq/pgmq-extension
- name: Install stoml and pg-trunk
shell: bash
run: |
Expand All @@ -66,12 +67,10 @@ jobs:
- name: Make trunk
run: make Trunk.toml
- name: trunk build
working-directory: ./
run: trunk build --pg-version ${{ matrix.pg-version }}
- name: trunk publish
# only publish release events
if: github.event_name == 'release'
working-directory: ./
env:
TRUNK_API_TOKEN: ${{ secrets.TRUNK_AUTH_TOKEN }}
run: |
Expand All @@ -81,8 +80,6 @@ jobs:
trunk publish pgmq --version ${pgmq_ver} --description "A lightweight message queue. Like AWS SQS and RSMQ, on Postgres." --homepage "https://github.com/tembo-io/pgmq" --repository "https://github.com/tembo-io/pgmq" --license "PostgreSQL" --category featured --category orchestration
build_and_push:
name: Build and push images
# needs:
# - publish
runs-on:
- self-hosted
- dind
Expand Down Expand Up @@ -123,13 +120,15 @@ jobs:
password: ${{ secrets.QUAY_PASSWORD_TEMBO }}

- name: Generate dockerfile from template file
working-directory: ./
run: ./images/pgmq-pg/replace-pg-version.sh ${{ matrix.pg }} ./images/pgmq-pg/Dockerfile.in ./images/pgmq-pg/Dockerfile

- name: Build and push -- Commit
# push commit build when not a release
if: github.event_name != 'release'
uses: docker/build-push-action@v5
with:
working-directory: ./
file: ./images/pgmq-pg/Dockerfile
context: .
platforms: linux/amd64, linux/arm64
Expand All @@ -142,6 +141,7 @@ jobs:
if: github.event_name == 'release'
uses: docker/build-push-action@v5
with:
working-directory: ./
file: ./images/pgmq-pg/Dockerfile
context: .
platforms: linux/amd64, linux/arm64
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/extension_upgrade.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,21 @@ name: PGMQ Extension Upgrade
defaults:
run:
shell: bash
working-directory: ./
working-directory: ./pgmq-extension

on:
pull_request:
branches:
- main
paths-ignore:
- "pgmq-rs/**"
- "tembo-pgmq-python/**"
paths:
- "pgmq-extension/**"
- ".github/workflows/extension_upgrade.yml"
push:
branches:
- main
paths-ignore:
- "pgmq-rs/**"
- "tembo-pgmq-python/**"
paths:
- "pgmq-extension/**"
- ".github/workflows/extension_upgrade.yml"
release:
types:
- created
Expand Down
4 changes: 2 additions & 2 deletions UPDATING.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Now, connect to postgres and run:
ALTER EXTENSION pgmq UPDATE
```

If successfull, pgmq is updated!
If successful, pgmq is updated!

#### When building from source (pre-1.3.0)

Expand All @@ -55,4 +55,4 @@ Now, connect to postgres and run:
ALTER EXTENSION pgmq UPDATE
```

If successfull, pgmq is updated!
If successful, pgmq is updated!
10 changes: 4 additions & 6 deletions images/pgmq-pg/Dockerfile.in
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,13 @@ RUN apt-get update \
pkg-config \
postgresql-server-dev-@@PG_VERSION@@


# Install pgmq
COPY . pgmq
RUN cd pgmq && make && make install
RUN cd ..
COPY ./pgmq-extension pgmq-extension
RUN cd pgmq-extension && make && make install

# install pg_partman
RUN git clone https://github.com/pgpartman/pg_partman.git && \
cd pg_partman && \
git checkout v4.7.4 && make && make install
RUN cd pgmq-extension && make install-pg-partman

FROM postgres:@@PG_VERSION@@-bookworm

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading