5 # designed to work on Jenkins
7 # Tom Junk, July 22, 2021
9 echo "duneanaobj version: $DUNEANAOBJ_VERSION"
10 echo "target qualifier (input): $QUAL"
11 echo "build type: $BUILDTYPE"
12 QUAL=`echo ${QUAL} | sed -e "s/-/:/g"`
13 FQUAL=${QUAL}:${BUILDTYPE}
14 echo "Full qualifier: $FQUAL"
15 echo "workspace: $WORKSPACE"
17 # Get number of cores to use.
19 ncores=`cat /proc/cpuinfo 2>/dev/null | grep -c -e '^processor'`
20 if [ $ncores -lt 1 ]; then
23 echo "Building using $ncores cores."
25 # Environment setup, uses cvmfs.
27 echo "ls /cvmfs/dune.opensciencegrid.org/products/dune/"
28 ls /cvmfs/dune.opensciencegrid.org/products/dune/
31 echo "ls /cvmfs/larsoft.opensciencegrid.org/products/"
32 ls /cvmfs/larsoft.opensciencegrid.org/products/
35 echo "ls /cvmfs/fermilab.opensciencegrid.org/products/common/db"
36 ls /cvmfs/fermilab.opensciencegrid.org/products/common/db
39 if [ -f /cvmfs/dune.opensciencegrid.org/products/dune/setup_dune.sh ]; then
40 if [ -x /cvmfs/grid.cern.ch/util/cvmfs-uptodate ]; then
41 /cvmfs/grid.cern.ch/util/cvmfs-uptodate /cvmfs/dune.opensciencegrid.org/products
43 source /cvmfs/dune.opensciencegrid.org/products/dune/setup_dune.sh || exit 1
45 echo "No setup file found."
49 setup gitflow || exit 1
50 export MRB_PROJECT=dune
54 rm -rf $WORKSPACE/temp || exit 1
55 mkdir -p $WORKSPACE/temp || exit 1
56 mkdir -p $WORKSPACE/copyBack || exit 1
57 rm -f $WORKSPACE/copyBack/* || exit 1
58 cd $WORKSPACE/temp || exit 1
60 mrb newDev -v $DUNEANAOBJ_VERSION -q $FQUAL || exit 1
62 source localProducts*/setup || exit 1
64 cd $MRB_SOURCE || exit 1
65 mrb g -b master --repo-type github --github-org dune -r -t $DUNEANAOBJ_VERSION duneanaobj || exit 1
67 cd $MRB_BUILDDIR || exit 1
69 mrb b -j$ncores || exit 1
70 mrb mp -n duneanaobj -- -j$ncores || exit 1
75 if uname | grep -q Darwin; then
84 mv *.bz2 $WORKSPACE/copyBack/ || exit 1
86 ls -l $WORKSPACE/copyBack/
87 cd $WORKSPACE || exit 1
88 rm -rf $WORKSPACE/temp || exit 1