Skip to content

Commit

Permalink
Upload builds as tgz and as directory to DOPA server
Browse files Browse the repository at this point in the history
  • Loading branch information
rmetzger authored and StephanEwen committed Oct 23, 2013
1 parent 08a9e76 commit 9fef277
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 13 deletions.
4 changes: 4 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,12 @@ jdk:
- openjdk6
env:
global:
# username and password for sonatype (maven delpoy)
- secure: "QoLd3npmApUw20q+KTt+6Il07bn/edl5pP3jmEqR+rXQXVA2kogjkZerZ5QdM2iQJha7D1M2Y4BTcsJ2Ty7biTxUZkDl+RXz6kpeHPX2alax/KO7mqrJuEfuPAQvaIdHNmKEmdiU/fLMn2q2HllE5MP7FzUNKD5YJIzh1IekPA8="
- secure: "WzMGwNwWwWw62kwvknMGS4W1zy3oRVihitCjjd5wqk/4JMTeWr+oAMv0GfA8GbOuOcYwA7JNxGXQlBMtn45+/PMLJgnsLxYUbqCD2ybwMBLlnembGYoRPABp5zkuzRmU3G2cbMdu/7VwvlTffEPPG/jqAFLKxmvG0oIOtPtk3lg="
# DOPA_USER and DOPA_PASS
- secure: "ntw3Gptom4JMVLpHOeEULcX62W2GbSAG/mLBTCu5sx8++imcN8mKCsgKe0f31tYoYS9vLFtoj/9+6Ar7kbWL2fDYnMlYJActQjsk7+W/ffD4DloV0MTpDs3MFR6G6HwKAB36z3vnHn9YcIIQJ7EThb6iSxviPwhY8Zx6wOjp7Fg="
- secure: "axUYH3fpUAKsYHHey1HgZ1+FaU0hgwXsG7x2V4p3dAjwgrnu0PAxJU91qI1oMQQ7ckGNaS2+G/5Tx16ryOq95PqlzlWO5EQJtPpX8R40f53ozBUN2ITCAgFsSEXeIs6sdk8kqfxGU36E9ovfG8EO2lJDV/ZysElz8a5NKHGpsvo="
matrix:
- PROFILE=
- PROFILE="-Dhadoop.profile=2"
Expand Down
57 changes: 44 additions & 13 deletions tools/deploy_to_maven.sh
Original file line number Diff line number Diff line change
@@ -1,19 +1,50 @@
#!/usr/bin/env bash


#
# This script is called by travis to deploy our project to sonatype SNAPSHOTS.
# It will deploy both a hadoop v1 and a hadoop v2 (yarn) artifact
#
CURRENT_STRATOSPHERE_VERSION=0.4-SNAPSHOT
CURRENT_STRATOSPHERE_VERSION_YARN=0.4-hadoop2-SNAPSHOT

# Check if push/commit is eligible for pushing
echo "Job: $TRAVIS_JOB_NUMBER ; isPR: $TRAVIS_PULL_REQUEST"
if [[ $TRAVIS_JOB_NUMBER == *1 ]] && [[ $TRAVIS_PULL_REQUEST == "false" ]] ; then
# Deploy regular hadoop v1 to maven
mvn -DskipTests deploy --settings deploysettings.xml;

# deploy hadoop v2 (yarn)
echo "Generating poms for hadoop-yarn."
./tools/generate_specific_pom.sh 0.4-SNAPSHOT 0.4-hadoop2-SNAPSHOT
mvn -f pom.hadoop2.xml -DskipTests clean deploy --settings deploysettings.xml;
fi
if [[ $TRAVIS_PULL_REQUEST == "false" ]] ; then

#
# This script is called by travis to deploy our project to sonatype SNAPSHOTS.
# It will deploy both a hadoop v1 and a hadoop v2 (yarn) artifact
#

if [[ $TRAVIS_JOB_NUMBER == *1 ]] && [[ $TRAVIS_PULL_REQUEST == "false" ]] ; then
# Deploy regular hadoop v1 to maven
mvn -DskipTests deploy --settings deploysettings.xml;

# deploy hadoop v2 (yarn)
echo "Generating poms for hadoop-yarn."
./tools/generate_specific_pom.sh $CURRENT_STRATOSPHERE_VERSION $CURRENT_STRATOSPHERE_VERSION_YARN
mvn -f pom.hadoop2.xml -DskipTests clean deploy --settings deploysettings.xml;
fi

#
# Deploy binaries to DOPA
# The TRAVIS_JOB_NUMBER here is kinda hacked.
# Currently, there are Builds 1-6. Build 1 is deploying to maven sonatype
# Build 2 has no special meaning, it is the openjdk7, hadoop 1.2.1 build
# Build 5 is openjdk7, hadoop yarn (2.0.5-beta) build.
# Please be sure not to use Build 1 as it will always be the yarn build.
#

set -x
if [[ $TRAVIS_JOB_NUMBER == *5 ]] ; then
CURRENT_STRATOSPHERE_VERSION=$CURRENT_STRATOSPHERE_VERSION_YARN
fi
if [[ $TRAVIS_JOB_NUMBER == *2 ]] || [[ $TRAVIS_JOB_NUMBER == *5 ]] ; then
sudo apt-get install sshpass
echo "Uploading build to dopa.dima.tu-berlin.de. Job Number: $TRAVIS_JOB_NUMBER"
mkdir stratosphere
cp -r stratosphere-dist/target/stratosphere-dist-$CURRENT_STRATOSPHERE_VERSION-bin/stratosphere-$CURRENT_STRATOSPHERE_VERSION/* stratosphere/
tar -czf stratosphere-$CURRENT_STRATOSPHERE_VERSION.tgz stratosphere
sshpass -p "$DOPA_PASS" scp -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -r stratosphere-$CURRENT_STRATOSPHERE_VERSION.tgz stratosphere-dist $DOPA_USER@dopa.dima.tu-berlin.de:bin/
fi

fi # pull request check


0 comments on commit 9fef277

Please sign in to comment.