-
Notifications
You must be signed in to change notification settings - Fork 796
/
Jenkinsfile
46 lines (38 loc) · 1.35 KB
/
Jenkinsfile
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
#!groovy
node {
stage "Build AliRoot"
def test_script = '''
# Make sure we have only one builder per directory
x=`date +"%s"`
WORKAREA=/build/workarea/pr/${week}
CURRENT_SLAVE=unknown
while [[ "$CURRENT_SLAVE" != '' ]]; do
WORKAREA_INDEX=$((WORKAREA_INDEX+1))
CURRENT_SLAVE=$(cat $WORKAREA/$WORKAREA_INDEX/current_slave 2> /dev/null || true)
[[ "$CURRENT_SLAVE" == "$NODE_NAME" ]] && CURRENT_SLAVE=
done
mkdir -p $WORKAREA/$WORKAREA_INDEX
echo $NODE_NAME > $WORKAREA/$WORKAREA_INDEX/current_slave
rm -fr alibuild alidist
git clone https://github.com/alisw/alidist
git clone https://github.com/alisw/alibuild
(cd alidist && git show)
alibuild/aliBuild -w $WORKAREA/$WORKAREA_INDEX \
--reference-sources /build/mirror \
--debug \
--remote-store rsync://repo.marathon.mesos/store/ \
build AliPhysics || BUILDERR=$?
rm -f $WORKAREA/$WORKAREA_INDEX/current_slave
if [ ! "X$BUILDERR" = X ]; then
exit $BUILDERR
fi
'''
parallel(
"slc5": {
node ("slc5_x86-64-large") {
dir ("AliPhysics") { checkout scm }
sh test_script
}
}
)
}