Skip to content

Commit

Permalink
RONDB-779: Fixed build. Failing due to MYSQL_VERSION_EXTRA in cluster…
Browse files Browse the repository at this point in the history
…j jar name (#576)
  • Loading branch information
smkniazi authored Nov 19, 2024
1 parent 6701a10 commit 0ff1ddb
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 7 deletions.
8 changes: 5 additions & 3 deletions build_scripts/release_scripts/build_all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ fi

source $SRC_DIR_ABS/MYSQL_VERSION
RONDB_VERSION="$MYSQL_VERSION_MAJOR.$MYSQL_VERSION_MINOR.$MYSQL_VERSION_PATCH"
RONDB_VERSION_EXTRA="$MYSQL_VERSION_EXTRA"

if [[ "$OUTPUT_DIR" == "" ]]; then
echo "Output directory not specified"
Expand Down Expand Up @@ -133,8 +134,9 @@ echo "Build Params:
Release: $RELEASE_BUILD
Deploy: $DEPLOY
Number of build threads: $CORES
RonDB version: $RONDB_VERSION"

RonDB version: $RONDB_VERSION
RonDB version Extra: $RONDB_VERSION_EXTRA"

if [ "$RELEASE_BUILD" = true ]; then
echo "_____________ BUILDING RONDB. RELEASE: TRUE _____________"
cd $TEMP_BUILD_DIR_ABS
Expand Down Expand Up @@ -186,5 +188,5 @@ if [ "$DEPLOY" = true ]; then
CLUSTERJ_ARTIFACT_POSTFIX=""
fi

$SRC_DIR_ABS/build_scripts/release_scripts/deploy.sh $RONDB_VERSION $TARBALL_NAME $OUTPUT_DIR_ABS $SRC_DIR_ABS/id_rsa "$CLUSTERJ_ARTIFACT_POSTFIX"
$SRC_DIR_ABS/build_scripts/release_scripts/deploy.sh $RONDB_VERSION $TARBALL_NAME $OUTPUT_DIR_ABS $SRC_DIR_ABS/id_rsa "$CLUSTERJ_ARTIFACT_POSTFIX" "$RONDB_VERSION_EXTRA"
fi
21 changes: 17 additions & 4 deletions build_scripts/release_scripts/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ TARBALL_NAME=$2
OUTPUT_DIR_ABS=$3
ABS_PATH_RSA_KEY=$4
CLUSTERJ_ARTIFACT_POSTFIX=$5
RONDB_VERSION_EXTRA=$6

TAR_FILE="$TARBALL_NAME.tar.gz"

Expand All @@ -32,14 +33,26 @@ if [ "$CPU_ARCH" != "x86_64" ]; then
exit 0
fi

echo "Extracting ClusterJ JAR file from tarball again"
set +e

# First attempt. clusterj-$RONDB_VERSION.jar. e.g. 22.10.6.jar
echo "Extracting ClusterJ JAR file from tarball"
JAR_FILE="$TARBALL_NAME/share/java/clusterj-$RONDB_VERSION.jar"
tar xf $TAR_FILE_ABS $JAR_FILE
if [[ ! -f "$JAR_FILE" ]]; then
echo "Error: Unable to find cluster file '$JAR_FILE'"
exit 1
echo "Error: Unable to find cluster file '$JAR_FILE'. Retrying ..."

# Second attempt. e.g. 22.10.6LTS.jar
JAR_FILE="$TARBALL_NAME/share/java/clusterj-$RONDB_VERSION$RONDB_VERSION_EXTRA.jar"
tar xf $TAR_FILE_ABS $JAR_FILE
if [[ ! -f "$JAR_FILE" ]]; then
echo "Error: Unable to find cluster file '$JAR_FILE'"
exit 1
fi
fi

set -e

mvn deploy:deploy-file -Dfile=$JAR_FILE -DgroupId=com.mysql.ndb -DartifactId=clusterj-rondb \
-Dversion=$RONDB_VERSION$CLUSTERJ_ARTIFACT_POSTFIX -Dpackaging=jar -DrepositoryId=Hops \
-Durl=https://archiva.hops.works/repository/Hops \
Expand All @@ -54,7 +67,7 @@ mvn deploy:deploy-file -Dfile=$JAR_FILE -DgroupId=com.mysql.ndb -DartifactId=clu
-DJenkinsHops.User=$EE_USER \
-DJenkinsHops.Password=$EE_PASS

echo "Extracting libndbclient.so.6.1.0 file from tarball again"
echo "Extracting libndbclient.so.6.1.0 file from tarball"
LIBNDB_FILE="$TARBALL_NAME/lib/libndbclient.so.6.1.0"
tar xf $TAR_FILE_ABS $LIBNDB_FILE
if [[ ! -f "$LIBNDB_FILE" ]]; then
Expand Down

0 comments on commit 0ff1ddb

Please sign in to comment.