forked from Internet2/grouper
-
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.
added changes for travis CI and coveralls.
- Loading branch information
1 parent
13c65fb
commit 6e51f25
Showing
6 changed files
with
224 additions
and
19 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 |
---|---|---|
@@ -1,13 +1,19 @@ | ||
/grouper-parent/target/ | ||
/grouper-misc/morphString/target/ | ||
/grouper-misc/grouperClient/target/ | ||
/subject/target/ | ||
/grouper/target/ | ||
/ldappcng/grouper-shib/target/ | ||
/grouper/bin/* | ||
**/target | ||
**/classes | ||
**/.idea | ||
**/*.iml | ||
/**/bin/* | ||
/grouper/logs/ | ||
/ldappcng/ldappcng/target/ | ||
/grouper/build.properties | ||
/grouper/build.log | ||
/grouper-misc/grouperScim/target/ | ||
/grouper-ui/webapp/WEB-INF/classes | ||
grouper/conf/ehcache.xml | ||
grouper/conf/grouper.client.properties | ||
grouper/conf/grouper.hibernate.properties | ||
grouper/conf/grouper.properties | ||
grouper/conf/grouper-loader.properties | ||
grouper/conf/log4j.properties | ||
grouper/conf/morphString.properties | ||
grouper/conf/server.properties | ||
grouper/conf/sources.xml | ||
grouper/conf/spy.properties | ||
grouper/conf/subject.properties |
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,32 @@ | ||
# Steps to enable the this build are: | ||
# | ||
# Generate the OAUTH-TOKEN atd at https://github.com/settings/applications | ||
# Install travis: gem install travis | ||
# Login to travis: travis login | ||
# Encrypt the token: travis encrypt GH_TOKEN=[OAUTH-TOKEN] -r Jasig/cas --add env.global | ||
# | ||
|
||
language: java | ||
branches: | ||
only: | ||
- master | ||
- GROUPER_2_1_BRANCH | ||
- GROUPER_2_2_BRANCH | ||
jdk: | ||
- oraclejdk7 | ||
- openjdk6 | ||
- openjdk7 | ||
- oraclejdk8 | ||
before_script: | ||
- cd grouper-parent | ||
script: | ||
- mvn clean package | ||
before_install: | ||
#- chmod -R 777 ./travis/init-travis-build.sh | ||
#- ./travis/init-travis-build.sh | ||
after_success: | ||
#- chmod -R 777 ./travis/push-javadoc-to-gh-pages.sh | ||
#- ./travis/push-javadoc-to-gh-pages.sh | ||
- mvn clean test cobertura:cobertura coveralls:cobertura | ||
#- chmod -R 777 ./travis/test-commit-message.sh | ||
#- ./travis/test-commit-message.sh |
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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/bin/bash | ||
|
||
echo -e "Building branch: ${TRAVIS_BRANCH}" | ||
echo -e "Build directory: ${TRAVIS_BUILD_DIR}" | ||
echo -e "Build id: ${TRAVIS_BUILD_ID}" | ||
echo -e "Builder number: ${TRAVIS_BUILD_NUMBER}" | ||
echo -e "Job id: ${TRAVIS_JOB_ID}" | ||
echo -e "Job number: ${TRAVIS_JOB_NUMBER}" | ||
echo -e "Repo slug: ${TRAVIS_REPO_SLUG}" | ||
echo -e "OS name: ${TRAVIS_OS_NAME}" | ||
|
||
if [ "$TRAVIS_SECURE_ENV_VARS" == "false" ] | ||
then | ||
echo -e "Secure environment variables are NOT available...\n" | ||
else | ||
echo -e "Secure environment variables are available...\n" | ||
#echo -e "GH_TOKEN -> ${GH_TOKEN}" | ||
fi |
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,67 @@ | ||
#!/bin/bash | ||
# | ||
# Licensed to Jasig under one or more contributor license | ||
# agreements. See the NOTICE file distributed with this work | ||
# for additional information regarding copyright ownership. | ||
# Jasig licenses this file to you under the Apache License, | ||
# Version 2.0 (the "License"); you may not use this file | ||
# except in compliance with the License. You may obtain a | ||
# copy of the License at the following location: | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, | ||
# software distributed under the License is distributed on an | ||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
# KIND, either express or implied. See the License for the | ||
# specific language governing permissions and limitations | ||
# under the License. | ||
# | ||
|
||
invokeJavadoc=false | ||
|
||
# Only invoke the javadoc deployment process | ||
# for the first job in the build matrix, so as | ||
# to avoid multiple deployments. | ||
|
||
if [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_BRANCH" == "master" ]; then | ||
case "${TRAVIS_JOB_NUMBER}" in | ||
*\.1) | ||
echo -e "Invoking Javadoc deployment for Travis job ${TRAVIS_JOB_NUMBER}" | ||
invokeJavadoc=true;; | ||
esac | ||
fi | ||
|
||
if [ "$invokeJavadoc" == true ]; then | ||
|
||
echo -e "Start to publish lastest Javadoc to gh-pages...\n" | ||
|
||
echo -e "Invokin Maven to generate the site documentation...\n" | ||
mvn site site:stage -q -ff -B | ||
|
||
echo -e "Copying the generated docs over...\n" | ||
cp -R target/staging $HOME/javadoc-latest | ||
|
||
cd $HOME | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "travis-ci" | ||
echo -e "Cloning the gh-pages branch...\n" | ||
git clone --quiet --branch=gh-pages https://${GH_TOKEN}@github.com/Jasig/cas gh-pages > /dev/null | ||
|
||
cd gh-pages | ||
echo -e "Removing javadocs...\n" | ||
git rm -rf ./current/javadocs | ||
git rm -rf ./development/javadocs | ||
|
||
echo -e "Copying new javadocs to current...\n" | ||
cp -Rf $HOME/javadoc-latest ./development/javadocs | ||
echo -e "Adding changes to the index...\n" | ||
git add -f . | ||
echo -e "Committing changes...\n" | ||
git commit -m "Lastest javadoc on successful travis build $TRAVIS_BUILD_NUMBER auto-pushed to gh-pages" | ||
echo -e "Pushing upstream to origin...\n" | ||
git push -fq origin gh-pages > /dev/null | ||
|
||
echo -e "Done magic with auto publishment to gh-pages.\n" | ||
|
||
fi |
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,41 @@ | ||
#!/bin/bash | ||
|
||
if test "$1" == ""; then | ||
if [ "$TRAVIS_COMMIT_RANGE" == "" -o "$TRAVIS_PULL_REQUEST" == "false" ] | ||
then | ||
echo -n "Using fallback for commit range (last commit): " | ||
RANGE='HEAD^..HEAD' | ||
else | ||
echo -n "Using \$TRAVIS_COMMIT_RANGE for commit range: " | ||
# Range is given on the form of 515744f1079f...23be2b8db4d7. | ||
# Therefore, we need to adjust it to Git commit range format. | ||
RANGE=`echo $TRAVIS_COMMIT_RANGE | sed 's/\.\.\./../'` | ||
fi | ||
else | ||
echo -n "Using command line parameter for commit range: " | ||
RANGE=$1 | ||
fi | ||
echo $RANGE | ||
|
||
for sha in `git log --format=oneline "$RANGE" | cut '-d ' -f1` | ||
do | ||
echo -e "Checking commit message for SHA: $sha..." | ||
git rev-list --no-merges --format=%B --max-count=1 $sha|awk ' | ||
NR == 2 && !/^(CAS-|CHECKSTYLE|JAVADOCS|NOJIRA|\[maven-release-plugin\])/ { | ||
print "Commit message does not comply with commit guidelines." | ||
print "Message:" | ||
print $0 | ||
exit 1 | ||
} | ||
' | ||
EXITCODE=$? | ||
if [ $EXITCODE -ne 0 ]; then | ||
echo -e "\nTravis-CI build has failed." | ||
echo | ||
echo "Commit message for $sha is not following commit guidelines. Please see:" | ||
echo "http://jasig.github.io/cas/developer/Contributor-Guidelines.html" | ||
exit $EXITCODE | ||
else | ||
echo "OK." | ||
fi | ||
done |