Skip to content
This repository has been archived by the owner on Nov 27, 2023. It is now read-only.

Commit

Permalink
Travis CI configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielThomas committed Sep 1, 2015
1 parent 69a8a7c commit 092c73d
Show file tree
Hide file tree
Showing 4 changed files with 61 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .travis.yml
@@ -0,0 +1,21 @@
language: java
sudo: false
jdk:
- oraclejdk7
install: "./installViaTravis.sh"
script: "./buildViaTravis.sh"
cache:
directories:
- "$HOME/.gradle/caches/"
before_install:
- test $TRAVIS_PULL_REQUEST = false && openssl aes-256-cbc -K $encrypted_bc816709edb0_key -iv $encrypted_bc816709edb0_iv
-in gradle.properties.enc -out ../../templates/gradle.properties -d || true
after_success:
- "./gradlew jacocoTestReport coveralls"
notifications:
webhooks:
urls:
- https://webhooks.gitter.im/e/f6b7a63532f846f96d89
on_success: change
on_failure: always
on_start: never
23 changes: 23 additions & 0 deletions buildViaTravis.sh
@@ -0,0 +1,23 @@
#!/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 build
elif [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_TAG" == "" ]; then
echo -e 'Build Branch with Snapshot => Branch ['$TRAVIS_BRANCH']'
./gradlew -Prelease.travisci=true snapshot
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 candidate --info
;;
*)
./gradlew -Prelease.travisci=true -Prelease.useLastTag=true final publishPlugins --info
;;
esac
else
echo -e 'WARN: Should not be here => Branch ['$TRAVIS_BRANCH'] Tag ['$TRAVIS_TAG'] Pull Request ['$TRAVIS_PULL_REQUEST']'
./gradlew build
fi
1 change: 1 addition & 0 deletions gradle.properties.enc
@@ -0,0 +1 @@
��x���ۃ�L$B�a�ٝ�.�2�Tu���څ�1�}^_���]�R�Џ�cL4O�YnS� ��'�8�A6-ic<�n�B��b��g#�ـ]��ѧ!5d��8�?r3T��8t;!܊�'�G�� (�>Y?��"������uҗ�p���ێR�`�5��Ӛ��z3p��Pے��\B�l�\����6��_���a����}��Q����f��b�3-�;�n̼�J��^���������s�x��F�'#9K�\N�U~j5}Sȝ��WWrMp��хL5��^
16 changes: 16 additions & 0 deletions installViaTravis.sh
@@ -0,0 +1,16 @@
#!/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 092c73d

Please sign in to comment.