Skip to content

Commit

Permalink
travis: add script to deploy both versions of ozone to sonatype
Browse files Browse the repository at this point in the history
  • Loading branch information
rmetzger committed Oct 1, 2013
1 parent a6a0a75 commit e813c93
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ env:

install: true

script: "mvn $PROFILE clean verify"
script: mvn $PROFILE clean verify"

# deploy if the first job is successful; should be replaced by an after_all_success if travis finally supports it
after_success:
- if [[ $TRAVIS_JOB_NUMBER == *1 ]] && [[ $TRAVIS_PULL_REQUEST == \"false\" ]] ; then mvn -DskipTests deploy --settings deploysettings.xml; fi
- "./tools/deploy_to_maven.sh"
19 changes: 19 additions & 0 deletions tools/deploy_to_maven.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/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
#

# 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-ozone-SNAPSHOT 0.4-ozone-hadoop2-SNAPSHOT
mvn -f pom.hadoop2.xml -DskipTests clean deploy --settings deploysettings.xml;
fi
4 changes: 2 additions & 2 deletions tools/generate_specific_pom.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env sh
#!/usr/bin/env bash

#
# See https://github.com/dimalabs/ozone/issues/95
Expand All @@ -8,7 +8,7 @@

function usage {
echo "Usage: $0 CURRENT_VERSION NEW_VERSION"
echo "For example, $0 0.2-ozone 0.2-ozone-hadoop2"
echo "For example, $0 0.4-ozone-SNAPSHOT 0.4-ozone-hadoop2-SNAPSHOT"
echo "Presumes VERSION has hadoop1 or hadoop2 in it."
exit 1
}
Expand Down

0 comments on commit e813c93

Please sign in to comment.