This is an automated email from the ASF dual-hosted git repository.

adutra pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/polaris.git


The following commit(s) were added to refs/heads/main by this push:
     new 27710e3f Adapt Kind run.sh script to Quarkus (#843)
27710e3f is described below

commit 27710e3fbd015a1f5866a365d4d46b44b98f606c
Author: Alexandre Dutra <[email protected]>
AuthorDate: Thu Jan 23 19:53:06 2025 +0100

    Adapt Kind run.sh script to Quarkus (#843)
---
 k8/deployment.yaml |  2 +-
 run.sh             | 44 +++++++++++++++++---------------------------
 2 files changed, 18 insertions(+), 28 deletions(-)

diff --git a/k8/deployment.yaml b/k8/deployment.yaml
index 2dc09824..4d30fda5 100644
--- a/k8/deployment.yaml
+++ b/k8/deployment.yaml
@@ -39,7 +39,7 @@ spec:
     spec:
       containers:
       - name: polaris
-        image: localhost:5001/polaris:latest
+        image: localhost:5001/apache/polaris:latest
         ports:
         - containerPort: 8181
         - containerPort: 8182
diff --git a/run.sh b/run.sh
index 5947b898..088cfd7b 100755
--- a/run.sh
+++ b/run.sh
@@ -21,56 +21,46 @@
 
 # Runs Polaris as a mini-deployment locally. Creates two pods that bind 
themselves to port 8181.
 
-# Initialize variables
-BUILD_ARGS=""  # Initialize an empty string to store Docker build arguments
-
 # Function to display usage information
 usage() {
-  echo "Usage: $0 [-b build-arg1=value1;build-arg2=value2;...] [-h]"
-  echo "  -b    Pass a set of arbitrary build arguments to docker build, 
separated by semicolons"
-  echo "  -h    Display this help message"
+  echo "Usage: $0 [--eclipse-link-deps=<deps>] [-h|--help]"
+  echo "  --eclipse-link-deps=<deps>  EclipseLink dependencies to use, e.g."
+  echo "                              
--eclipse-link-deps=org.postgresql:postgresql:42.7.4"
+  echo "  -h, --help                  Display this help message"
   exit 1
 }
 
 # Parse command-line arguments
-while getopts "b:h" opt; do
-  case ${opt} in
-    b)
-      IFS=';' read -ra ARGS <<< "${OPTARG}"  # Split the semicolon-separated 
list into an array
-      for arg in "${ARGS[@]}"; do
-        BUILD_ARGS+=" --build-arg ${arg}"  # Append each build argument to the 
list
-      done
+while [[ "$#" -gt 0 ]]; do
+  case $1 in
+    --eclipse-link-deps=*)
+      ECLIPSE_LINK_DEPS="-PeclipseLinkDeps=${1#*=}"
       ;;
-    h)
+    -h|--help)
       usage
       ;;
     *)
       usage
       ;;
   esac
+  shift
 done
 
-# Shift off the options and arguments
-shift $((OPTIND-1))
-
 # Deploy the registry
 echo "Building Kind Registry..."
 sh ./kind-registry.sh
 
-# Check if BUILD_ARGS is not empty and print the build arguments
-if [[ -n "$BUILD_ARGS" ]]; then
-  echo "Building polaris image with build arguments:$BUILD_ARGS"
-else
-  echo "Building polaris image without any additional build arguments."
-fi
-
 # Build and deploy the server image
 echo "Building polaris image..."
-docker build -t localhost:5001/polaris $BUILD_ARGS -f Dockerfile .
+./gradlew :polaris-quarkus-server:build $ECLIPSE_LINK_DEPS \
+  -Dquarkus.container-image.build=true \
+  -Dquarkus.container-image.registry=localhost:5001
+
 echo "Pushing polaris image..."
-docker push localhost:5001/polaris
+docker push localhost:5001/apache/polaris
+
 echo "Loading polaris image to kind..."
-kind load docker-image localhost:5001/polaris:latest
+kind load docker-image localhost:5001/apache/polaris:latest
 
 echo "Applying kubernetes manifests..."
 kubectl delete -f k8/deployment.yaml --ignore-not-found

Reply via email to