Skip to content
Snippets Groups Projects
Commit 84b45954 authored by anttil's avatar anttil
Browse files

SWE-22 / SSDM-32: Gradle based build script for openBIS installer / openBIS...

SWE-22 / SSDM-32: Gradle based build script for openBIS installer / openBIS APIs / CIFEX - cifex build not implemented yet.

SVN: 31301
parent 319e1e62
No related branches found
No related tags found
No related merge requests found
#!/bin/sh
usage()
{
echo ""
echo "Usage: ./build.sh <openbis/cifex/apis> [trunk/sprint] [sprint version]"
echo ""
echo "Example: ./build.sh cifex" - will build cifex installer from trunk
echo "Example: ./build.sh apis sprint" - will build openBIS clients and APIs package from latest released sprint.
echo "Example: ./build.sh openbis sprint S178" - will build the openBIS installer from latest revision of sprint S178.
echo "Example: ./build.sh apis sprint S178.1" - will build openBIS clients and APIs package from revision 1 of sprint S178.
exit 1
}
if [ $# -lt 1 ]
then
usage
fi
DIR=`dirname $0`
if [ "$1" == "openbis" ] || [ "$1" == "apis" ]
then
${DIR}/gradle/build_openbis.sh $@
elif [ "$1" == "cifex" ]
then
echo "building cifex"
else
echo "Unknown product $1"
fi
exit 0
#!/bin/bash
PRODUCT=$1
BRANCH=$2
VERSION=$3
PROJECTS="\
gradle \
authentication \
build_resources \
common \
datamover \
datastore_server \
dbmigration \
deep_sequencing_unit \
eu_agronomics \
eu_basynthec \
eu_basysbio \
image_readers \
installation \
integration-tests \
js-test \
openbis \
openbis_api \
openbis_mobile \
openbis_standard_technologies \
openbis-common \
plasmid \
rtd_cina \
rtd_phosphonetx \
rtd_yeastx \
sanofi \
screening \
ui-test\
"
LATEST_SPRINT=`svn list svn+ssh://svncisd.ethz.ch/repos/cisd/openbis_all/branches/sprint/|awk '{print $0, length()}'|sort -n --key=2|awk '{print $1'}|tail -1|sed -e "s/.x\///g"`
rm -rf /tmp/gradle-build
mkdir -p /tmp/gradle-build
for project in $PROJECTS; do
if [[ -z "$BRANCH" ]]
then
BRANCH=trunk
fi
if [ "$BRANCH" == "trunk" ]
then
SVN_PATH="${project}/trunk"
elif [ "$BRANCH" == "sprint" ]
then
if [[ -z "$VERSION" ]]
then
VERSION=$LATEST_SPRINT
fi
if [[ $VERSION == *.* ]]
then
TAG=${VERSION}/
VERSION=`echo $VERSION|cut -d. -f1`
else
TAG=`svn list svn+ssh://svncisd.ethz.ch/repos/cisd/openbis_all/tags/sprint/${VERSION}.x/|awk '{print $0, length()}'|sort -n --key=2|awk '{print $1'}|tail -1`
fi
SVN_PATH="openbis_all/tags/sprint/${VERSION}.x/${TAG}${project}"
svn ls svn+ssh://svncisd.ethz.ch/repos/cisd/$SVN_PATH --depth=empty 2>/dev/null >/dev/null
if [ $? -ne 0 ]
then
echo "Unable to read svn+ssh://svncisd.ethz.ch/repos/cisd/$SVN_PATH - aborting"
exit 1
fi
else
echo "Unknown branch $BRANCH (valid options: trunk / sprint)"
exit 1
fi
svn co svn+ssh://svncisd.ethz.ch/repos/cisd/$SVN_PATH /tmp/gradle-build/${project}
done
pushd .
cd /tmp/gradle-build/gradle
if [ "$PRODUCT" == "openbis" ]
then
./gradlew :installation:build -x test
popd
mv /tmp/gradle-build/installation/targets/gradle/distributions/*.tar.gz .
else
./gradlew :openbis_standard_technologies:clientsAndApis -x test
popd
mv /tmp/gradle-build/openbis_standard_technologies/targets/gradle/distributions/openBIS-clients-and-APIs*.zip .
fi
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment