Skip to content

Commit

Permalink
Build viable Docker images for Polaris using Quarkus
Browse files Browse the repository at this point in the history
  • Loading branch information
adutra committed Jan 10, 2025
1 parent 9e31371 commit 499c4e9
Show file tree
Hide file tree
Showing 20 changed files with 742 additions and 108 deletions.
31 changes: 23 additions & 8 deletions .github/workflows/helm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,12 @@ jobs:
with:
fetch-depth: 0

- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'

- name: Set up Helm
uses: azure/[email protected]
with:
Expand Down Expand Up @@ -83,25 +89,34 @@ jobs:
if: steps.list-changed.outputs.changed == 'true'
uses: medyagh/[email protected]

- name: Docker build
- name: Print Docker info
if: steps.list-changed.outputs.changed == 'true'
run: |
docker -v
minikube docker-env
- name: Image build
if: steps.list-changed.outputs.changed == 'true'
run: |
eval $(minikube docker-env)
docker build -f ./Dockerfile \
--build-arg ECLIPSELINK=true \
--build-arg ECLIPSELINK_DEPS=com.h2database:h2:2.3.232 \
-t polaris:latest .
export BUILD_TAG=helm-ci-$(date +%s)
echo BUILD_TAG=${BUILD_TAG} >> ${GITHUB_ENV}
eval $(minikube -p minikube docker-env)
./gradlew :polaris-quarkus-server:assemble \
-Dquarkus.container-image.build=true \
-Dquarkus.container-image.name=polaris-testing \
-Dquarkus.container-image.tag=${BUILD_TAG}
minikube image ls
- name: Install fixtures
if: steps.list-changed.outputs.changed == 'true'
run: |
kubectl create namespace polaris-ns
kubectl apply --namespace polaris-ns $(find helm/polaris/ci/fixtures -name "*.yaml" -exec echo -n "-f {} " \;)
kubectl apply --namespace polaris-ns -f helm/polaris/ci/fixtures
- name: Run chart-testing (install)
if: steps.list-changed.outputs.changed == 'true'
run: |
ct install --target-branch ${{ github.event.repository.default_branch }} \
--namespace polaris-ns \
--helm-extra-set-args "--set=image.repository=polaris --set=image.tag=latest" \
--helm-extra-set-args "--set=image.repository=apache/polaris-testing --set=image.tag=${BUILD_TAG}" \
--debug --charts ./helm/polaris
29 changes: 27 additions & 2 deletions .github/workflows/regtest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,35 @@ jobs:

steps:
- uses: actions/checkout@v4
- name: fix permissions

- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'

- name: Fix permissions
run: mkdir -p regtests/output && chmod 777 regtests/output && chmod 777 regtests/t_*/ref/*

- name: Image build
run: |
export BUILD_TAG=regtests-ci-$(date +%s)
echo BUILD_TAG=${BUILD_TAG} >> ${GITHUB_ENV}
./gradlew :polaris-quarkus-server:assemble \
-Dquarkus.container-image.build=true \
-Dquarkus.container-image.name=polaris-testing \
-Dquarkus.container-image.tag=${BUILD_TAG}
- name: Regression Test
env:
AWS_ACCESS_KEY_ID: ${{secrets.AWS_ACCESS_KEY_ID}}
AWS_SECRET_ACCESS_KEY: ${{secrets.AWS_SECRET_ACCESS_KEY}}
run: docker compose up --build --exit-code-from regtest
run: |
cd regtests
# create compose override file and set image tag
cat <<EOF > docker-compose.override.yml
services:
polaris:
image: apache/polaris-testing:${BUILD_TAG}
EOF
docker compose up --build --exit-code-from regtest
67 changes: 0 additions & 67 deletions Dockerfile

This file was deleted.

Loading

0 comments on commit 499c4e9

Please sign in to comment.