Skip to content

Commit

Permalink
Add travis-ci config
Browse files Browse the repository at this point in the history
  • Loading branch information
cfieber committed Nov 20, 2015
1 parent 46b48d0 commit f9ff145
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
language: java
jdk:
- oraclejdk8
sudo: false
install: gradle/installViaTravis.sh
script: gradle/buildViaTravis.sh
cache:
directories:
- $HOME/.gradle/caches
env:
global:
- secure: A+pzYPXBbemtE6Hb3uFs89z3CywS3PfxO9uPe9dfjOuqbxeutTDdVPOypuVbm4bRko2SChbyQ4CrnZxsNqmx0QGrQku8t75csKZPrrE8+eF5YHaN7llsX1XWQ0C5aO6J8k6b3+XxhG+MURkmlxFM7pbTvNyfgUOUOnKIQGO7fVj0kB96a9f0xRwj1QMGaEKrGwYzxXMRCnxfW0tvnwuVBhk/r0cG/10FuC5IFBLheWdwicniFtSUpKuRaDXC9eDgcNmS8fRrD6JxUC1e7+ETMcaKmnRYJ/+bdDdDh/7wTG6azORLbCyYx2YWd1rdXcO8iI78bxo2+M8zKIXz3IHXc5svmX1PXwxFBaCz4ZrU+K+XuM80OnVaLgUFZMb/LcqyMDy2IngIsksTadj+CYkKzLiaNnpwGmJpvmYDVw+Wr/oxSNuAuFTfICCu9q642KRcojWK8oM233lco2G76SIy/f7RsI8Yr53vYO/pamSeWyrMXG+guVLVsa5lA1R0Q9xM5JAJ2LTvi+oFhGVhnqnTAmV6PO0bDBfTKy26DLLv+WeSsjUL1e2HD1Owa2NFM4Ptot2nAw/1ocRj3ZNbPcU+GkPvCzX9TByCdXuPdGuY4MJyNEGjkIZUVp9wWZZEcnajb4rumygg9FsXThn41RythsIliGvaRjCg025FsXzFDVo=
- secure: GO5QrPkAuKm7Hp37XyEEMu+9ky1fKjovHl5SqRAwD8aJckK58U4Xk8CkLS//4xC49xN+r1/8vPQrs7iim+FZ7Mm2jdij8EM8pyfPnkfUykD2yfP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skkvbYbq+m2olTxTGoCCnIIQEhZi3Amz79pA9r9GfL63g0ICFr5rFrtp+/A5cUDhpA1uW+AC0Myt3stkDZ+nsM7tUL/6Pa8UmH9fxGONL+TK41/Da/NlTpJYQkv+Ok0fCbALIHbpRCSR1/WR+ePnh9A67dPVUmztQ4HEYcG+Dt9i/ozCjTTaJNaPT9I46A=
24 changes: 24 additions & 0 deletions gradle/buildViaTravis.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/bin/bash
# This script will build the project.

if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
echo -e "Build Pull Request #$TRAVIS_PULL_REQUEST => Branch [$TRAVIS_BRANCH]"
./gradlew -Prelease.useLastTag=true build
elif [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_TAG" == "" ]; then
echo -e 'Build Branch with Snapshot => Branch ['$TRAVIS_BRANCH']'
./gradlew -Prelease.travisci=true -PbintrayUser="${bintrayUser}" -PbintrayKey="${bintrayKey}" build snapshot --stacktrace
elif [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_TAG" != "" ]; then
echo -e 'Build Branch for Release => Branch ['$TRAVIS_BRANCH'] Tag ['$TRAVIS_TAG']'
case "$TRAVIS_TAG" in
*-rc\.*)
./gradlew -Prelease.travisci=true -Prelease.useLastTag=true -PbintrayUser="${bintrayUser}" -PbintrayKey="${bintrayKey}" candidate --info
;;
*)
./gradlew -Prelease.travisci=true -Prelease.useLastTag=true -PbintrayUser="${bintrayUser}" -PbintrayKey="${bintrayKey}" final --info
;;
esac
else
echo -e 'WARN: Should not be here => Branch ['$TRAVIS_BRANCH'] Tag ['$TRAVIS_TAG'] Pull Request ['$TRAVIS_PULL_REQUEST']'
./gradlew -Prelease.useLastTag=true build
fi

17 changes: 17 additions & 0 deletions gradle/installViaTravis.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/bash
# This script will build the project.

if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
echo -e "Assemble Pull Request #$TRAVIS_PULL_REQUEST => Branch [$TRAVIS_BRANCH]"
./gradlew assemble
elif [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_TAG" == "" ]; then
echo -e 'Assemble Branch with Snapshot => Branch ['$TRAVIS_BRANCH']'
./gradlew -Prelease.travisci=true assemble
elif [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_TAG" != "" ]; then
echo -e 'Assemble Branch for Release => Branch ['$TRAVIS_BRANCH'] Tag ['$TRAVIS_TAG']'
./gradlew -Prelease.travisci=true -Prelease.useLastTag=true assemble
else
echo -e 'WARN: Should not be here => Branch ['$TRAVIS_BRANCH'] Tag ['$TRAVIS_TAG'] Pull Request ['$TRAVIS_PULL_REQUEST']'
./gradlew assemble
fi

0 comments on commit f9ff145

Please sign in to comment.