Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 51 additions & 0 deletions run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
#!/usr/bin/env bash

# This script is suitable for local use.
# It is also invoked by Jenkins (from scripts/jobs/integrate/community-build).

# usage:
# ./run.sh
# ./run.sh project1
# ./run.sh project1,project2,project3

set -e
set -o pipefail

export LANG="en_US.UTF-8"
export HOME="$(pwd)"

DBUILDVERSION=0.9.5
echo "dbuild version: $DBUILDVERSION"

DBUILDCONFIG=community.dbuild
echo "dbuild config file: $DBUILDCONFIG"

if [ ! -f "$DBUILDCONFIG" ]
then
echo "File not found: $DBUILDCONFIG"
exit 1
fi

if [ ! -d "dbuild-${DBUILDVERSION}" ]
then
wget "http://repo.typesafe.com/typesafe/ivy-releases/com.typesafe.dbuild/dbuild/${DBUILDVERSION}/tgzs/dbuild-${DBUILDVERSION}.tgz"
tar xfz "dbuild-${DBUILDVERSION}.tgz"
rm "dbuild-${DBUILDVERSION}.tgz"
fi

# sigh, Ubuntu has nodejs but OS X has node
if hash nodejs 2>/dev/null; then
export NODE=nodejs
else
export NODE=node
fi

# use -n since running locally you don't want notifications sent,
# and on our Jenkins setup it doesn't actually work (for now anyway)

echo "dbuild-${DBUILDVERSION}/bin/dbuild" -n "$DBUILDCONFIG" "${@}"
"dbuild-${DBUILDVERSION}/bin/dbuild" -n "$DBUILDCONFIG" "${@}" 2>&1 | tee "dbuild-${DBUILDVERSION}/dbuild.out"
STATUS="$?"
BUILD_ID="$(grep '^\[info\] uuid = ' "dbuild-${DBUILDVERSION}/dbuild.out" | sed -e 's/\[info\] uuid = //')"
echo "The repeatable UUID of this build was: ${BUILD_ID}"
exit "$STATUS"
76 changes: 0 additions & 76 deletions scripts/dbuild-runner.sh

This file was deleted.

8 changes: 6 additions & 2 deletions scripts/jobs/integrate/community-build
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
#!/usr/bin/env bash

DBUILDVERSION=0.9.5
set -e

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

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

./run.sh $scala_build_extra_opt