-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSparkBuildRunnableDist.xml
More file actions
executable file
·80 lines (63 loc) · 2.03 KB
/
SparkBuildRunnableDist.xml
File metadata and controls
executable file
·80 lines (63 loc) · 2.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
<?xml version='1.0' encoding='UTF-8'?>
<project>
<actions/>
<description></description>
<keepDependencies>false</keepDependencies>
<properties/>
<scm class="hudson.scm.NullSCM"/>
<canRoam>true</canRoam>
<disabled>false</disabled>
<blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
<blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
<triggers>
<hudson.triggers.TimerTrigger>
<spec>0 8 * * 1
</spec>
</hudson.triggers.TimerTrigger>
</triggers>
<concurrentBuild>false</concurrentBuild>
<builders>
<hudson.tasks.Shell>
<command>#!/bin/bash
branchClone=2.0
hiveBuild=FALSE
hadoopVer=2.7
export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-ppc64el
export PATH=$JAVA_HOME/bin:$JAVA_HOME/jre/bin:$PATH
workDir=/root/WeeklySparkValidation
echo -en 'Creating Workspace directory '
mkdir -p ${workDir}/workspace/${JOB_NAME}
cd ${workDir}/workspace/${JOB_NAME}
echo -en 'Spark branch to be cloned ' ${branchClone}
echo -en '\n\n'
echo -en 'Hadoop version to be built for ' ${hadoopVer}
echo -en '\n\n'
if [ $hiveBuild == TRUE ]
then
hiveFlag=with
elif [ $hiveBuild == FALSE ]
then
hiveFlag=without
fi
rm -rf spark
git clone --recursive --depth 1 https://github.com/apache/spark.git -b branch-${branchClone}
cd spark
java -version
if [ $hiveBuild == TRUE ]
then
echo " Building with Hive and JDBC Support \n "
./dev/make-distribution.sh --name custom-${branchClone}-spark --tgz -Psparkr -Phadoop-${hadoopVer} -Phive -Phive-thriftserver -Pyarn
elif [ $hiveBuild == FALSE ]
then
echo " Building without Hive and JDBC Support \n "
./dev/make-distribution.sh --name custom-${branchClone}-spark --tgz -Psparkr -Phadoop-${hadoopVer} -Pyarn
fi
now=$(date +"%d-%m-%Y_%H:%M:%S")
cp /var/lib/jenkins/jobs/${JOB_NAME}/builds/${BUILD_NUMBER}/log ${workDir}/logs/${JOB_NAME}/${JOB_NAME}_${now}.log
exit 0
</command>
</hudson.tasks.Shell>
</builders>
<publishers/>
<buildWrappers/>
</project>