-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit faa491c
Showing
9 changed files
with
812 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
name: Build Polaris Admin Tool PostgreSQL | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- "docker/**" | ||
- ".github/workflows/polaris-admin-tool.yml" | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
packages: write | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Checkout Polaris | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: apache/polaris | ||
path: polaris | ||
|
||
- name: Prepare repository name | ||
id: repo | ||
run: | | ||
REPO_LOWER=$(echo "${{ github.repository }}" | tr '[:upper:]' '[:lower:]') | ||
echo "lowercase=$REPO_LOWER" >> $GITHUB_OUTPUT | ||
- name: Set up JDK 21 | ||
uses: actions/setup-java@v4 | ||
with: | ||
java-version: "21" | ||
distribution: "temurin" | ||
cache: gradle | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Login to GitHub Container Registry | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Extract metadata | ||
id: meta | ||
uses: docker/metadata-action@v5 | ||
with: | ||
images: | ||
ghcr.io/${{ | ||
steps.repo.outputs.lowercase}}/apache-polaris-admin-tool-pgsql | ||
tags: | | ||
type=raw,value=latest | ||
type=sha | ||
type=ref,event=branch | ||
type=ref,event=tag | ||
- name: Process tags for Quarkus | ||
id: tags | ||
run: | | ||
# Convert metadata tags to comma-separated list | ||
TAGS=$(echo "${{ steps.meta.outputs.tags }}" | tr '\n' ',' | sed 's/,$//') | ||
# Remove the registry prefix from each tag | ||
CLEAN_TAGS=$(echo $TAGS | sed "s|ghcr.io/${{ steps.repo.outputs.lowercase }}/apache-polaris-admin-tool-pgsql:||g") | ||
echo "tags=$CLEAN_TAGS" >> $GITHUB_OUTPUT | ||
- name: Build with Gradle and Create Docker Image | ||
working-directory: ./polaris | ||
env: | ||
ECLIPSE_LINK_DEPS: "org.postgresql:postgresql:42.7.4" # Add if needed | ||
IMAGE_REGISTRY: ghcr.io | ||
run: | | ||
./gradlew clean :polaris-quarkus-admin:build \ | ||
-PeclipseLinkDeps=${ECLIPSE_LINK_DEPS} \ | ||
-Dquarkus.container-image.build=true \ | ||
-Dquarkus.container-image.group= \ | ||
-Dquarkus.container-image.name=${{ steps.repo.outputs.lowercase }}/apache-polaris-admin-tool-pgsql \ | ||
-Dquarkus.container-image.tag=latest \ | ||
-Dquarkus.container-image.additional-tags=${{ steps.tags.outputs.tags }} \ | ||
-Dquarkus.container-image.push=true \ | ||
-Dquarkus.container-image.registry=${IMAGE_REGISTRY} \ | ||
-Dquarkus.container-image.builder=docker \ | ||
-Dquarkus.container-image.platforms=linux/amd64,linux/arm64 \ | ||
-Dquarkus.jib.platforms=linux/amd64,linux/arm64 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
name: Build PolarisServer with PostgreSQL | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- "docker/**" | ||
- ".github/workflows/polaris-server-image.yml" | ||
workflow_dispatch: | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
packages: write | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Checkout Polaris | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: apache/polaris | ||
path: polaris | ||
|
||
- name: Prepare repository name | ||
id: repo | ||
run: | | ||
REPO_LOWER=$(echo "${{ github.repository }}" | tr '[:upper:]' '[:lower:]') | ||
echo "lowercase=$REPO_LOWER" >> $GITHUB_OUTPUT | ||
- name: Set up JDK 21 | ||
uses: actions/setup-java@v4 | ||
with: | ||
java-version: "21" | ||
distribution: "temurin" | ||
cache: gradle | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Login to GitHub Container Registry | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Extract metadata | ||
id: meta | ||
uses: docker/metadata-action@v5 | ||
with: | ||
images: | ||
ghcr.io/${{ | ||
steps.repo.outputs.lowercase}}/apache-polaris-server-pgsql | ||
tags: | | ||
type=raw,value=latest | ||
type=sha | ||
type=ref,event=branch | ||
type=ref,event=tag | ||
- name: Process tags for Quarkus | ||
id: tags | ||
run: | | ||
# Convert metadata tags to comma-separated list | ||
TAGS=$(echo "${{ steps.meta.outputs.tags }}" | tr '\n' ',' | sed 's/,$//') | ||
# Remove the registry prefix from each tag | ||
CLEAN_TAGS=$(echo $TAGS | sed "s|ghcr.io/${{ steps.repo.outputs.lowercase }}/apache-polaris-server-pgsql:||g") | ||
echo "tags=$CLEAN_TAGS" >> $GITHUB_OUTPUT | ||
- name: Build with Gradle and Create Docker Image | ||
working-directory: ./polaris | ||
env: | ||
ECLIPSE_LINK_DEPS: "org.postgresql:postgresql:42.7.4" # Add if needed | ||
IMAGE_REGISTRY: ghcr.io | ||
run: | | ||
./gradlew clean :polaris-quarkus-server:build \ | ||
-PeclipseLinkDeps=${ECLIPSE_LINK_DEPS} \ | ||
-Dquarkus.container-image.build=true \ | ||
-Dquarkus.container-image.group= \ | ||
-Dquarkus.container-image.name=${{ steps.repo.outputs.lowercase }}/apache-polaris-server-pgsql \ | ||
-Dquarkus.container-image.tag=latest \ | ||
-Dquarkus.container-image.additional-tags=${{ steps.tags.outputs.tags }} \ | ||
-Dquarkus.container-image.push=true \ | ||
-Dquarkus.container-image.registry=${IMAGE_REGISTRY} \ | ||
-Dquarkus.container-image.builder=docker \ | ||
-Dquarkus.container-image.platforms=linux/amd64,linux/arm64 \ | ||
-Dquarkus.jib.platforms=linux/amd64,linux/arm64 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
dist | ||
.direnv | ||
.env* | ||
!.env.example | ||
cosign* | ||
image-refs.txt | ||
.registry-data | ||
!.envrc | ||
!bin/*.sh | ||
**/.*.env | ||
**/*.secret | ||
**/rsa_* | ||
**/*.key | ||
**/*.pem | ||
bin/** | ||
!bin/*.py | ||
!bin/*.sh | ||
kubectl | ||
.task | ||
work/** | ||
!work/.gitkeep | ||
.vscode | ||
.ansible | ||
**/persistence.xml | ||
**/postgresql.yaml | ||
**/polaris.env |
Oops, something went wrong.