Skip to content

Commit

Permalink
Clean code.
Browse files Browse the repository at this point in the history
Signed-off-by: vegetableysm <[email protected]>
  • Loading branch information
vegetableysm committed Dec 25, 2023
1 parent bf4324d commit ef5d105
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 19 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/java-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ on:
- main
paths:
- 'java/hive/**'
- '.github/workflows/hive-base-test.yml'
- '.github/workflows/java-ci.yaml'
pull_request:
branches:
- main
paths:
- 'java/hive/**'
- '.github/workflows/hive-base-test.yml'
- '.github/workflows/java-ci.yaml'

concurrency:
group: ${{ github.repository }}-${{ github.event.number || github.head_ref || github.sha }}-${{ github.workflow }}
Expand All @@ -39,7 +39,7 @@ env:
jobs:
ci:
runs-on: ${{ matrix.os }}
if: true #${{ github.repository == 'v6d-io/v6d' }}
if: ${{ github.repository == 'v6d-io/v6d' }}
strategy:
matrix:
os: [ubuntu-20.04]
Expand Down
28 changes: 12 additions & 16 deletions java/hive/docker/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,9 @@ done

SOURCE_DIR=${SOURCE_DIR:-"../../.."}
repo=${REPO:-apache}
# WORK_DIR="$(mktemp -d)"
WORK_DIR=../../../hive-base-workdir
#WORK_DIR="/opt/tao/hive-docker-build"
mkdir -p "$WORK_DIR"
find "$WORK_DIR" -maxdepth 1 -mindepth 1 ! -name '*.tar.gz' -exec rm -rf {} \;
# HADOOP_VERSION=${HADOOP_VERSION:-$(mvn -f "$SOURCE_DIR/pom.xml" -q help:evaluate -Dexpression=hadoop.version -DforceStdout)}
# TEZ_VERSION=${TEZ_VERSION:-$(mvn -f "$SOURCE_DIR/pom.xml" -q help:evaluate -Dexpression=tez.version -DforceStdout)}
HADOOP_VERSION=${HADOOP_VERSION:-"3.3.4"}
TEZ_VERSION=${TEZ_VERSION:-"0.9.1"}
HIVE_VERSION=${HIVE_VERSION:-"2.3.9"}
Expand All @@ -96,8 +92,8 @@ else
TEZ_URL=${TEZ_URL:-"https://archive.apache.org/dist/tez/$TEZ_VERSION/apache-tez-$TEZ_VERSION-bin.tar.gz"}
echo "Downloading Tez from $TEZ_URL..."
if ! curl --fail -L "$TEZ_URL" -o "$WORK_DIR/apache-tez-$TEZ_VERSION-bin.tar.gz"; then
echo "Failed to download Tez, exiting..."
exit 1
echo "Failed to download Tez, exiting..."
exit 1
fi
fi

Expand All @@ -106,22 +102,22 @@ if [ -f "$WORK_DIR/apache-hive-$HIVE_VERSION-bin.tar.gz" ]; then
else
echo "Download Hive..."
if [ -n "$HIVE_VERSION" ]; then
HIVE_URL=${HIVE_URL:-"https://archive.apache.org/dist/hive/hive-$HIVE_VERSION/apache-hive-$HIVE_VERSION-bin.tar.gz"}
echo "Downloading Hive from $HIVE_URL..."
if ! curl --fail -L "$HIVE_URL" -o "$WORK_DIR/apache-hive-$HIVE_VERSION-bin.tar.gz"; then
HIVE_URL=${HIVE_URL:-"https://archive.apache.org/dist/hive/hive-$HIVE_VERSION/apache-hive-$HIVE_VERSION-bin.tar.gz"}
echo "Downloading Hive from $HIVE_URL..."
if ! curl --fail -L "$HIVE_URL" -o "$WORK_DIR/apache-hive-$HIVE_VERSION-bin.tar.gz"; then
echo "Failed to download Hive, exiting..."
exit 1
fi
hive_package="$WORK_DIR/apache-hive-$HIVE_VERSION-bin.tar.gz"
fi
hive_package="$WORK_DIR/apache-hive-$HIVE_VERSION-bin.tar.gz"
else
HIVE_VERSION=$(mvn -f "$SOURCE_DIR/pom.xml" -q help:evaluate -Dexpression=project.version -DforceStdout)
HIVE_TAR="$SOURCE_DIR/packaging/target/apache-hive-$HIVE_VERSION-bin.tar.gz"
if ls $HIVE_TAR || mvn -f $SOURCE_DIR/pom.xml clean package -DskipTests -Pdist; then
HIVE_VERSION=$(mvn -f "$SOURCE_DIR/pom.xml" -q help:evaluate -Dexpression=project.version -DforceStdout)
HIVE_TAR="$SOURCE_DIR/packaging/target/apache-hive-$HIVE_VERSION-bin.tar.gz"
if ls $HIVE_TAR || mvn -f $SOURCE_DIR/pom.xml clean package -DskipTests -Pdist; then
cp "$HIVE_TAR" "$WORK_DIR/"
else
else
echo "Failed to compile Hive Project, exiting..."
exit 1
fi
fi
fi
fi

Expand Down

0 comments on commit ef5d105

Please sign in to comment.