forked from apache/flink
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Upload builds as tgz and as directory to DOPA server
- Loading branch information
Showing
2 changed files
with
48 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|
||
|