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

[WIP] Build viable Docker images for Polaris using Quarkus #610

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from
Draft
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
2 changes: 1 addition & 1 deletion .github/workflows/check-md-link.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,5 @@ jobs:
with:
use-quiet-mode: 'yes'
config-file: '.github/workflows/check-md-link-config.json'
folder-path: 'regtests, .github, build-logic, polaris-core, service, dropwizard, extension, spec, k8, getting-started, helm'
folder-path: 'regtests, .github, build-logic, polaris-core, service, quarkus, extension, spec, k8, getting-started, helm'
file-path: 'CHAT_BYLAWS.md, CODE_OF_CONDUCT.md, CONTRIBUTING.md, README.md, SECURITY.md'
2 changes: 1 addition & 1 deletion .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ jobs:
name: upload-test-artifacts
path: |
polaris-core/build/test-results/test
dropwizard/service/build/test-results/test
quarkus/service/build/test-results/test
# NOTE: The Gradle Wrapper is the default and recommended way to run Gradle (https://docs.gradle.org/current/userguide/gradle_wrapper.html).
# If your project does not have the Gradle Wrapper configured, you can use the following configuration to run Gradle with a specified version.
Expand Down
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
47 changes: 0 additions & 47 deletions Dockerfile

This file was deleted.

Loading
Loading