Skip to content

Commit b2f3f97

Browse files
authored
Merge pull request #331 from SethTisue/clean-up-run-scripts
support specifying only certain projects to be built
2 parents be8102d + c30c3b2 commit b2f3f97

File tree

3 files changed

+57
-78
lines changed

3 files changed

+57
-78
lines changed

run.sh

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
#!/usr/bin/env bash
2+
3+
# This script is suitable for local use.
4+
# It is also invoked by Jenkins (from scripts/jobs/integrate/community-build).
5+
6+
# usage:
7+
# ./run.sh
8+
# ./run.sh project1
9+
# ./run.sh project1,project2,project3
10+
11+
set -e
12+
set -o pipefail
13+
14+
export LANG="en_US.UTF-8"
15+
export HOME="$(pwd)"
16+
17+
DBUILDVERSION=0.9.5
18+
echo "dbuild version: $DBUILDVERSION"
19+
20+
DBUILDCONFIG=community.dbuild
21+
echo "dbuild config file: $DBUILDCONFIG"
22+
23+
if [ ! -f "$DBUILDCONFIG" ]
24+
then
25+
echo "File not found: $DBUILDCONFIG"
26+
exit 1
27+
fi
28+
29+
if [ ! -d "dbuild-${DBUILDVERSION}" ]
30+
then
31+
wget "http://repo.typesafe.com/typesafe/ivy-releases/com.typesafe.dbuild/dbuild/${DBUILDVERSION}/tgzs/dbuild-${DBUILDVERSION}.tgz"
32+
tar xfz "dbuild-${DBUILDVERSION}.tgz"
33+
rm "dbuild-${DBUILDVERSION}.tgz"
34+
fi
35+
36+
# sigh, Ubuntu has nodejs but OS X has node
37+
if hash nodejs 2>/dev/null; then
38+
export NODE=nodejs
39+
else
40+
export NODE=node
41+
fi
42+
43+
# use -n since running locally you don't want notifications sent,
44+
# and on our Jenkins setup it doesn't actually work (for now anyway)
45+
46+
echo "dbuild-${DBUILDVERSION}/bin/dbuild" -n "$DBUILDCONFIG" "${@}"
47+
"dbuild-${DBUILDVERSION}/bin/dbuild" -n "$DBUILDCONFIG" "${@}" 2>&1 | tee "dbuild-${DBUILDVERSION}/dbuild.out"
48+
STATUS="$?"
49+
BUILD_ID="$(grep '^\[info\] uuid = ' "dbuild-${DBUILDVERSION}/dbuild.out" | sed -e 's/\[info\] uuid = //')"
50+
echo "The repeatable UUID of this build was: ${BUILD_ID}"
51+
exit "$STATUS"

scripts/dbuild-runner.sh

Lines changed: 0 additions & 76 deletions
This file was deleted.
Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
#!/usr/bin/env bash
22

3-
DBUILDVERSION=0.9.5
3+
set -e
44

55
# otherwise these directories just keep growing.
66
# see scala/scala-jenkins-infra#115
77
rm -rf target-$DBUILDVERSION/project-builds
88
rm -rf target-$DBUILDVERSION/extraction
99

10-
scripts/dbuild-runner.sh "community.dbuild" "$DBUILDVERSION" "${@}"
10+
# TODO: in scala-jenkins-infra, make an actual parameter for
11+
# specifying projects to be built, instead of hijacking the
12+
# "scala_build_extra_opt" name for that purpose
13+
14+
./run.sh $scala_build_extra_opt

0 commit comments

Comments
 (0)