Skip to content

Commit

Permalink
[ADAM-752] Build for many combos of Spark/Hadoop versions.
Browse files Browse the repository at this point in the history
  • Loading branch information
fnothaft committed Aug 11, 2015
1 parent 3acd602 commit d687a4f
Showing 1 changed file with 16 additions and 9 deletions.
25 changes: 16 additions & 9 deletions scripts/jenkins-test
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,10 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
PROJECT_ROOT="$DIR/.."

VERSION="$(grep "<version>" "$PROJECT_ROOT/pom.xml" | head -2 | tail -1 | sed 's/ *<version>//g' | sed 's/<\/version>//g')"
HADOOP_VERSION="$(grep "<hadoop.version>" "$PROJECT_ROOT/pom.xml" | head -2 | tail -1 | sed 's/ *<hadoop.version>//g' | sed 's/<\/hadoop.version>//g')"
echo "Testing ADAM version ${VERSION} on Hadoop ${HADOOP_VERSION}"
echo "Testing ADAM version ${VERSION} on Spark ${SPARK_VERSION} and Hadoop ${HADOOP_VERSION}"

export MAVEN_OPTS="-Xmx1536m -XX:MaxPermSize=1g"
mvn test -P distribution -Dnetworkconnected -Dhadoop.version="${HADOOP_VERSION}"
mvn test -P distribution -Dnetworkconnected -Dhadoop.version="${HADOOP_VERSION}" -Dspark.version="${SPARK_VERSION}"

ADAM_TMP_DIR="$(mktemp -d -t "adamTestXXXXXXX")"
# Just to be paranoid.. use a directory internal to the ADAM_TMP_DIR
Expand All @@ -26,16 +25,24 @@ export SPARK_DRIVER_MEMORY=8g

pushd "$ADAM_TMP_DIR"


if [[ $HADOOP_VERSION == "1.0.4" ]]; then
wget -q http://d3kbcqa49mib13.cloudfront.net/spark-1.1.0-bin-hadoop1.tgz
tar xzvf spark-1.1.0-bin-hadoop1.tgz
export SPARK_HOME="${ADAM_TMP_DIR}/spark-1.1.0-bin-hadoop1"
HADOOP=hadoop1
elif [[ $HADOOP_VERSION == "2.6.0" ]]; then
HADOOP=hadoop2.6
elif [[ $HADOOP_VERSION == "2.3.0" ]]; then
HADOOP=hadoop2.3
else
wget -q http://d3kbcqa49mib13.cloudfront.net/spark-1.1.0-bin-hadoop2.3.tgz
tar xzvf spark-1.1.0-bin-hadoop2.3.tgz
export SPARK_HOME="${ADAM_TMP_DIR}/spark-1.1.0-bin-hadoop2.3"
echo "Unknown Hadoop version."
exit 1
fi

SPARK="spark-${SPARK_VERSION}"

wget -q http://d3kbcqa49mib13.cloudfront.net/${SPARK}-bin-${HADOOP}.tgz
tar xzvf ${SPARK}-bin-${HADOOP}.tgz
export SPARK_HOME="${ADAM_TMP_DIR}/${SPARK}-bin-${HADOOP}"

ADAM="./bin/adam-submit"

echo "Fetching BAM file"
Expand Down

0 comments on commit d687a4f

Please sign in to comment.