Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
293 additions
and
58 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
language: java | ||
jdk: | ||
- openjdk7 | ||
- oraclejdk8 | ||
before_install: | ||
- cp ./etc/settings.xml ~/.m2/ | ||
- cp ./etc/onFailure.sh ~/ | ||
- cp ./etc/onSuccess.sh ~/ | ||
- chmod 777 ~/onFailure.sh | ||
- chmod 777 ~/onSuccess.sh | ||
script: | ||
- mvn -B clean verify cobertura:cobertura coveralls:report | ||
after_failure: ~/onFailure.sh | ||
after_success: ~/onSuccess.sh | ||
notifications: | ||
email: false | ||
irc: | ||
channels: | ||
- chat.freenode.net#lightblue | ||
on_success: always | ||
env: | ||
global: | ||
- secure: KUsWgSyKeNX8dIs/lKdxsgsXub98d1pqSqEFuEGMEvrxGoFaB63B1zoIwYI5uzv67Ir36N0H7GVgeqYsELKaU8mMcRevd/FXkALuGyUdS8/pbiXVEYtDDdWZP1VYF/p4cm3+ZzvEIhqj8ZgLWeIlXpIRYm4WAsnDzrTEG93INgk= | ||
- secure: q/2hWviyGa/Kr7zWes9f6gIW3rJ7xf7lh5tMFrtvNuhfEO4XRra+ZYG5yBHgvvLu+J/AaksmU4SBDmEY85GuLn5uh25s6OM9vwhnpJ9lz7FQ6jK6Jnm7IwMuHYIuTTXf5m702APingF73dkYijxgMnyOK9EEHE5/cWEgznOizY4= |
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/usr/bin/env sh | ||
|
||
echo "DEBUG TRAVIS BUILD FAILURE" | ||
echo "Current directory is $(pwd)" | ||
echo "Sunfire reports" | ||
for i in `find . -type d -name surefire-reports` ; do for f in $i/*.txt; do echo $f : `cat $f`; done done |
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/usr/bin/env sh | ||
|
||
echo "DEPLOY MASTER TRAVIS BUILD" | ||
echo "Current directory is $(pwd)" | ||
'[[ $TRAVIS_BRANCH == "master" ]] && [[ $TRAVIS_JDK_VERSION == "openjdk7" ]] && { mvn clean deploy -DskipTests; };' |
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 |
---|---|---|
@@ -0,0 +1,53 @@ | ||
#!/bin/sh | ||
|
||
# https://github.com/lightblue-platform/lightblue-docs-developer/issues/6 | ||
|
||
RELEASE_VERSION=$1 | ||
DEVEL_VERSION=$2 | ||
|
||
if [ $1"x" == "x" ] || [ $2"x" == "x" ]; then | ||
echo "Usage: ./release.sh <release version> <new snapshot version>" | ||
echo "Example: ./release 1.1.0 1.2.0-SNAPSHOT" | ||
exit 1 | ||
fi | ||
|
||
# prepare and verify state | ||
git fetch --all | ||
rm -rf ~/.m2/repository/com/redhat/lightblue/ | ||
|
||
BRANCH=`git branch | grep ^* | awk '{print $2}'` | ||
|
||
if [ $BRANCH != "master" ]; then | ||
read -p "Current branch is '${BRANCH}', not 'master'. Do you wish to continue? (y/N) " | ||
if [ "$REPLY" != "y"]; then | ||
exit 1 | ||
fi | ||
fi | ||
|
||
# check that local branch is equal to upstream master (assumes remote of origin) | ||
MERGE_BASE=`git merge-base HEAD origin/master` | ||
HEAD_HASH=`git rev-parse HEAD` | ||
|
||
if [ $MERGE_BASE != $HEAD_HASH ]; then | ||
echo "Local branch is not in sync with origin/master. Fix and run this script again." | ||
exit 1 | ||
fi | ||
|
||
# update to non-snapshot versions of lightblue dependencies and commit | ||
mvn versions:update-properties -DallowSnapshots=false | ||
git commit -a -m "Updated versions to non snapshot" | ||
|
||
# prepare for release (note, this will warn if any snapshot dependencies still exist and allow for fixing) | ||
mvn release:prepare -P release \ | ||
-DpushChanges=false \ | ||
-DreleaseVersion=$RELEASE_VERSION \ | ||
-DdevelopmentVersion=$DEVEL_VERSION \ | ||
-Dtag=V${RELEASE_VERSION} || exit | ||
|
||
# push prepared changes (doing separate just to have control) | ||
git push origin master --tags | ||
|
||
# perform release | ||
mvn release:perform -P release || exit | ||
|
||
mvn clean deploy |
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 |
---|---|---|
@@ -0,0 +1,54 @@ | ||
#!/bin/sh | ||
|
||
# https://github.com/lightblue-platform/lightblue-docs-developer/issues/6 | ||
|
||
RELEASE_VERSION=$1 | ||
DEVEL_VERSION=$2 | ||
|
||
if [ $1"x" == "x" ] || [ $2"x" == "x" ]; then | ||
echo "Usage: ./release.sh <release version> <new snapshot version>" | ||
echo "Example: ./release 1.1.0 1.2.0-SNAPSHOT" | ||
exit 1 | ||
fi | ||
|
||
# prepare and verify state | ||
git fetch --all | ||
|
||
BRANCH=`git branch | grep ^* | awk '{print $2}'` | ||
|
||
if [ $BRANCH != "master" ]; then | ||
read -p "Current branch is '${BRANCH}', not 'master'. Do you wish to continue? (y/N) " | ||
if [ "$REPLY" != "y"]; then | ||
exit 1 | ||
fi | ||
fi | ||
|
||
# check that local branch is equal to upstream master (assumes remote of origin) | ||
MERGE_BASE=`git merge-base HEAD origin/master` | ||
HEAD_HASH=`git rev-parse HEAD` | ||
|
||
if [ $MERGE_BASE != $HEAD_HASH ]; then | ||
echo "Local branch is not in sync with origin/master. Fix and run this script again." | ||
exit 1 | ||
fi | ||
|
||
# update to non-snapshot versions of lightblue dependencies and commit | ||
mvn versions:update-properties -DallowSnapshots=false | ||
git commit -a -m "Updated versions to non snapshot" | ||
|
||
# prepare for release (note, this will warn if any snapshot dependencies still exist and allow for fixing) | ||
mvn release:prepare -P release \ | ||
-DpushChanges=false \ | ||
-DreleaseVersion=$RELEASE_VERSION \ | ||
-DdevelopmentVersion=$DEVEL_VERSION \ | ||
-Dtag=V${RELEASE_VERSION} || exit | ||
|
||
# push prepared changes (doing separate just to have control) | ||
git push origin master --tags | ||
|
||
# perform release | ||
mvn release:perform -P release || exit | ||
|
||
mvn versions:set -DnewVersion=$DEVEL_VERSION | ||
|
||
mvn clean deploy |
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 |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<settings> | ||
<activeProfiles> | ||
<!--make the profile active all the time --> | ||
<activeProfile>securecentral</activeProfile> | ||
</activeProfiles> | ||
<profiles> | ||
<profile> | ||
<id>securecentral</id> | ||
<!--Override the repository (and pluginRepository) "central" from the Maven Super POM --> | ||
<repositories> | ||
<repository> | ||
<id>central</id> | ||
<url>https://repo1.maven.org/maven2</url> | ||
<releases> | ||
<enabled>true</enabled> | ||
</releases> | ||
</repository> | ||
</repositories> | ||
<pluginRepositories> | ||
<pluginRepository> | ||
<id>central</id> | ||
<url>https://repo1.maven.org/maven2</url> | ||
<releases> | ||
<enabled>true</enabled> | ||
</releases> | ||
</pluginRepository> | ||
</pluginRepositories> | ||
</profile> | ||
</profiles> | ||
<servers> | ||
<server> | ||
<id>sonatype-nexus-snapshots</id> | ||
<username>${env.SONATYPE_USERNAME}</username> | ||
<password>${env.SONATYPE_PASSWORD}</password> | ||
</server> | ||
<server> | ||
<id>sonatype-nexus-staging</id> | ||
<username>${env.SONATYPE_USERNAME}</username> | ||
<password>${env.SONATYPE_PASSWORD}</password> | ||
</server> | ||
</servers> | ||
</settings> |
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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/bin/sh | ||
|
||
# kill any previous port forward | ||
pkill -9 -f "rhc port-forward sonar [-]n lightblue" | ||
|
||
# forward ports from openshift (assumes current server is openshift online and you're a member of the lightblue namespace) | ||
rhc port-forward sonar -n lightblue & | ||
|
||
# wait a bit for port forwarding to fire up | ||
sleep 10 | ||
|
||
# build and publish | ||
mvn clean install -Dmaven.test.failure.ignore=true | ||
mvn -e -B sonar:sonar | ||
|
||
# cleanup port forwarding | ||
pkill -9 -f "rhc port-forward sonar [-]n lightblue" |
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