5 HADOOP_ERRORS_IGNORE=""
7 #using Java6 openjdk for now.
8 HADOOP_JAVA_HOME="/usr/lib/jvm/java-6-openjdk"
9 export JAVA_HOME=$HADOOP_JAVA_HOME
11 #get the libcephfs jar and so files so the build works
12 GETLIBSOUTPUT=`python ../../get-libcephfs-java-jar.py`
16 HADOOP_ERRORS_IGNORE="\
17 grep -vi \"warning\"" #| \
18 #grep -v \"is not a pointer or array, skip client functions\" | \
19 #grep -v \"is a pointer to type 'string', skip client functions\""
21 REV="$(git rev-parse HEAD)"
23 DESTDIR_TMP="install.tmp"
24 OUTDIR="../out/output/sha1/$REV"
27 install -d -m0766 -- "$DESTDIR_TMP"
29 NCPU=$(( 2 * `grep -c processor /proc/cpuinfo` ))
31 echo "$0: building..."
32 echo --START-IGNORE-WARNINGS
33 # filter out idl errors "Unable to determine origin..." to avoid gitbuilder failing
34 ionice -c3 nice -n20 ant -Divy.default.ivy.user.dir=$CURRENT_DIR cephfs cephfs-test 2> >( eval ${HADOOP_ERRORS_IGNORE} ) || exit 4
36 OUTDIR_TMP="${OUTDIR}.tmp"
38 install -d -m0755 -- "$OUTDIR_TMP"
39 tar czf "${OUTDIR_TMP}/hadoop.tgz" -C "${CURRENT_DIR}" .
40 printf '%s\n' "$REV" >"$OUTDIR_TMP/sha1"
42 # we're successful, the files are ok to be published; try to be as
43 # atomic as possible about replacing potentially existing OUTDIR
44 if [ -e "$OUTDIR" ]; then
45 rm -rf -- "$OUTDIR.old"
46 mv -- "$OUTDIR" "$OUTDIR.old"
48 mv -- "$OUTDIR_TMP" "$OUTDIR"
49 rm -rf -- "$OUTDIR.old"