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

chengpan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kyuubi-docker.git


The following commit(s) were added to refs/heads/master by this push:
     new a0dfc1a  Enable Web UI for 1.8.0 and new versions
a0dfc1a is described below

commit a0dfc1a561ce1d5464c07017a57fd0ebfcfae8ec
Author: Cheng Pan <[email protected]>
AuthorDate: Tue Nov 7 11:34:38 2023 +0800

    Enable Web UI for 1.8.0 and new versions
---
 .github/workflows/docker-image.yml | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/.github/workflows/docker-image.yml 
b/.github/workflows/docker-image.yml
index df4df0b..7a49cff 100644
--- a/.github/workflows/docker-image.yml
+++ b/.github/workflows/docker-image.yml
@@ -54,11 +54,17 @@ jobs:
           password: ${{ secrets.DOCKERHUB_TOKEN }}
       - name: Build Kyuubi Docker Image
         run: |
+          # See simple version normalization: 
http://stackoverflow.com/questions/16989598/bash-comparing-version-numbers
+          function version { echo "$@" | awk -F. '{ printf("%03d%03d%03d\n", 
$1,$2,$3); }'; }
+          extra_build_args=""
           export KYUUBI_VERSION=$(cat release/release_version)
+          if [ $(version $KYUUBI_VERSION) -ge $(version "1.8.0") ]; then
+            extra_build_args="$extra_build_args --web-ui"
+          fi
           wget 
https://archive.apache.org/dist/kyuubi/kyuubi-${KYUUBI_VERSION}/apache-kyuubi-${KYUUBI_VERSION}-source.tgz
           tar -xvf apache-kyuubi-${KYUUBI_VERSION}-source.tgz
           cd apache-kyuubi-${KYUUBI_VERSION}-source
-          ./build/dist ${{ matrix.opts }}
+          ./build/dist ${{ matrix.opts }} $extra_build_args
           cd ..
           docker build --tag apache/kyuubi:${KYUUBI_VERSION}${{ 
matrix.suffix-name }} --file ${KYUUBI_VERSION}/*/Dockerfile 
apache-kyuubi-${KYUUBI_VERSION}-source/dist
       - name: Validate docker image

Reply via email to