-
Notifications
You must be signed in to change notification settings - Fork 0
AB-449 PostgreSQL Operator: Release workflow + PostgreSQL 15 to 18 Test Matrix #5
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
Changes from all commits
0d61233
4984200
27b0b57
14f473b
af2420f
e80d4ee
8510471
62b8137
1d16cfc
cc66654
dc5e0fa
de4bab9
becb9c1
e602f5a
f3c00a6
446b269
10283d2
3c80bff
3ec0efa
011ba49
c2a28cf
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,85 @@ | ||
| name: Release | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
| inputs: | ||
| increment: | ||
| description: "Version increment type" | ||
| type: choice | ||
| required: true | ||
| default: "Patch" | ||
| options: | ||
| - "Major" | ||
| - "Minor" | ||
| - "Patch" | ||
| - "Prerelease" | ||
|
|
||
| env: | ||
| DOCKER_IMAGE: ghcr.io/${{ github.repository }} | ||
|
|
||
| jobs: | ||
| test: | ||
| uses: ./.github/workflows/test.yml | ||
| secrets: inherit | ||
|
|
||
| build-and-release: | ||
| needs: test | ||
| runs-on: ubuntu-24.04 | ||
| timeout-minutes: 15 | ||
| steps: | ||
| - uses: actions/checkout@v6 | ||
| with: | ||
| token: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }} | ||
| - uses: aboutbits/github-actions-base/git-setup@v2 | ||
| - uses: aboutbits/github-actions-java/setup-with-gradle@v4 | ||
| with: | ||
| java-version: 25 | ||
| cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }} | ||
| - name: Increment version | ||
| run: ./gradlew --console=colored createRelease -Prelease.versionIncrementer=increment${{ github.event.inputs.increment }} | ||
| shell: bash | ||
| - name: Get next package version | ||
| id: nextVersion | ||
| run: echo "version=$(./gradlew currentVersion -q -Prelease.quiet)" >> $GITHUB_OUTPUT | ||
| shell: bash | ||
| - name: Build package | ||
| run: ./gradlew --console=colored build -x test | ||
| - name: Build Docker image | ||
| uses: aboutbits/github-actions-docker/build-push@v1 | ||
| with: | ||
| username: ${{ github.actor }} | ||
| password: ${{ secrets.GITHUB_TOKEN }} | ||
| docker-image: ${{ env.DOCKER_IMAGE }} | ||
| docker-tag: ${{ steps.nextVersion.outputs.version }} | ||
| working-directory: './operator' | ||
| dockerfile: './operator/src/main/docker/Dockerfile.jvm' | ||
| - name: Push tag to remote | ||
| run: ./gradlew --console=colored pushRelease | ||
| shell: bash | ||
| - uses: aboutbits/github-actions-base/github-create-release@v2 | ||
| with: | ||
| tag-name: 'v${{ steps.nextVersion.outputs.version }}' | ||
| release-description: | | ||
| ## Installation | ||
|
|
||
| ### Helm Chart | ||
| ```bash | ||
| helm install postgresql-operator https://github.com/${{ github.repository }}/releases/download/v${{ steps.nextVersion.outputs.version }}/postgresql-operator-${{ steps.nextVersion.outputs.version }}.tgz | ||
| ``` | ||
|
|
||
| ### Manual CRD Installation | ||
| ```bash | ||
| kubectl apply -f https://github.com/${{ github.repository }}/releases/download/v${{ steps.nextVersion.outputs.version }}/clusterconnections.postgresql.aboutbits.it-v1.yml | ||
| kubectl apply -f https://github.com/${{ github.repository }}/releases/download/v${{ steps.nextVersion.outputs.version }}/databases.postgresql.aboutbits.it-v1.yml | ||
| kubectl apply -f https://github.com/${{ github.repository }}/releases/download/v${{ steps.nextVersion.outputs.version }}/schemas.postgresql.aboutbits.it-v1.yml | ||
| kubectl apply -f https://github.com/${{ github.repository }}/releases/download/v${{ steps.nextVersion.outputs.version }}/roles.postgresql.aboutbits.it-v1.yml | ||
| kubectl apply -f https://github.com/${{ github.repository }}/releases/download/v${{ steps.nextVersion.outputs.version }}/grants.postgresql.aboutbits.it-v1.yml | ||
| kubectl apply -f https://github.com/${{ github.repository }}/releases/download/v${{ steps.nextVersion.outputs.version }}/defaultprivileges.postgresql.aboutbits.it-v1.yml | ||
| ``` | ||
| release-notes-generation: 'true' | ||
| - name: Upload Helm chart and CRD assets | ||
| env: | ||
| GH_TOKEN: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }} | ||
| run: | | ||
| gh release upload v${{ steps.nextVersion.outputs.version }} operator/build/helm/kubernetes/*.tgz operator/build/kubernetes/*.postgresql.aboutbits.it-v1.yml | ||
| shell: bash |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| Copyright About Bits GmbH | ||
|
|
||
| Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | ||
|
|
||
| The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | ||
|
|
||
| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,13 +1,15 @@ | ||
| # Gradle properties | ||
| org.gradle.caching=true | ||
| org.gradle.parallel=true | ||
| org.gradle.configuration-cache=true | ||
| # TODO: Set to true when https://github.com/quarkusio/quarkus/issues/49115 is fixed | ||
| org.gradle.parallel=false | ||
| org.gradle.logging.level=INFO | ||
|
|
||
| # Quarkus | ||
| quarkusPluginId=io.quarkus | ||
| quarkusPluginVersion=3.30.7 | ||
| quarkusPluginVersion=3.30.8 | ||
| # https://mvnrepository.com/artifact/io.quarkus.platform/quarkus-bom | ||
| quarkusPlatformGroupId=io.quarkus.platform | ||
| quarkusPlatformArtifactId=quarkus-bom | ||
| quarkusPlatformVersion=3.30.7 | ||
| quarkusPlatformVersion=3.30.8 | ||
| systemProp.quarkus.analytics.disabled=true |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| services: | ||
| db: | ||
| image: postgres:15 | ||
| command: [ "postgres", "-c", "checkpoint_timeout=10min", "-c", "fsync=off", "-c", "full_page_writes=off", "-c", "max_wal_size=2GB", "-c", "synchronous_commit=off" ] | ||
| tmpfs: | ||
| - /var/lib/postgresql/data:rw,async,noatime | ||
| healthcheck: | ||
| test: pg_isready -U root -d dummy | ||
| interval: 3s | ||
| timeout: 3s | ||
| retries: 3 | ||
| ports: | ||
| - "5432" | ||
| labels: | ||
| io.quarkus.devservices.compose.config_map.port.5432: quarkus.datasource.jdbc.port | ||
| environment: | ||
| - POSTGRES_USER=root | ||
| - POSTGRES_PASSWORD=password | ||
| - POSTGRES_DB=dummy |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| services: | ||
| db: | ||
| image: postgres:16 | ||
| command: [ "postgres", "-c", "checkpoint_timeout=10min", "-c", "fsync=off", "-c", "full_page_writes=off", "-c", "max_wal_size=2GB", "-c", "synchronous_commit=off" ] | ||
| tmpfs: | ||
| - /var/lib/postgresql/data:rw,async,noatime | ||
| healthcheck: | ||
| test: pg_isready -U root -d dummy | ||
| interval: 3s | ||
| timeout: 3s | ||
| retries: 3 | ||
| ports: | ||
| - "5432" | ||
| labels: | ||
| io.quarkus.devservices.compose.config_map.port.5432: quarkus.datasource.jdbc.port | ||
| environment: | ||
| - POSTGRES_USER=root | ||
| - POSTGRES_PASSWORD=password | ||
| - POSTGRES_DB=dummy |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| services: | ||
| db: | ||
| image: postgres:17 | ||
| command: [ "postgres", "-c", "checkpoint_timeout=10min", "-c", "fsync=off", "-c", "full_page_writes=off", "-c", "max_wal_size=2GB", "-c", "synchronous_commit=off" ] | ||
| tmpfs: | ||
| - /var/lib/postgresql/data:rw,async,noatime | ||
| healthcheck: | ||
| test: pg_isready -U root -d dummy | ||
| interval: 3s | ||
| timeout: 3s | ||
| retries: 3 | ||
| ports: | ||
| - "5432" | ||
| labels: | ||
| io.quarkus.devservices.compose.config_map.port.5432: quarkus.datasource.jdbc.port | ||
| environment: | ||
| - POSTGRES_USER=root | ||
| - POSTGRES_PASSWORD=password | ||
| - POSTGRES_DB=dummy |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,19 @@ | ||||||
| services: | ||||||
| db: | ||||||
| image: postgres:18 | ||||||
| command: [ "postgres", "-c", "checkpoint_timeout=10min", "-c", "fsync=off", "-c", "full_page_writes=off", "-c", "max_wal_size=2GB", "-c", "synchronous_commit=off" ] | ||||||
| tmpfs: | ||||||
| - /var/lib/postgresql/18/docker:rw,async,noatime | ||||||
|
||||||
| - /var/lib/postgresql/18/docker:rw,async,noatime | |
| - /var/lib/postgresql/data:rw,async,noatime |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, this is correct, see docker-library/postgres#1259
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the frontend packages we called this file like this. In the backend packages we used the name
publish.yml. I think the namerelease.ymlis more appropriate. I will make a note for myself to change it at all other backend packages.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed it already for all backend repositories.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like it.