Skip to content

Commit e612237

Browse files
authored
Merge pull request Netflix#150 from Netflix/updateTravis
updating travis
2 parents 1aacf12 + 7fedb95 commit e612237

File tree

4 files changed

+30
-8
lines changed

4 files changed

+30
-8
lines changed

.travis.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
language: java
2-
install: true
3-
script: ./travis.sh
2+
jdk:
3+
- oraclejdk7
4+
sudo: false
5+
install: ./installViaTravis.sh
6+
script: ./buildViaTravis.sh
7+
cache:
8+
directories:
9+
- $HOME/.gradle/caches/
410
env:
511
global:
612
- secure: GLRunlapijH/uL489R5wpobpQdLOKQS0oJ9Bk69K3Bee6quaaeK4bnO7aEQcSd2MSF0obFT1Hz9WWhiz18c50n9gfkwBsPxWI7AnGn3aQd+qNbJ8yacdAZ7MWq9oThMUblxnLR4figaJC6vtL48GReOVxAtqp/jGIBod5ugUW1Q=
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
#!/bin/bash
2-
# This script will build Dyno client.
2+
# This script will build the project.
33

44
if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
55
echo -e "Build Pull Request #$TRAVIS_PULL_REQUEST => Branch [$TRAVIS_BRANCH]"
6-
./gradlew build --stacktrace
6+
./gradlew build
77
elif [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_TAG" == "" ]; then
88
echo -e 'Build Branch with Snapshot => Branch ['$TRAVIS_BRANCH']'
9-
./gradlew -Prelease.travisci=true -PbintrayUser="${bintrayUser}" -PbintrayKey="${bintrayKey}" -PsonatypeUsername="${sonatypeUsername}" -PsonatypePassword="${sonatypePassword}" build snapshot --stacktrace
9+
./gradlew -Prelease.travisci=true -PbintrayUser="${bintrayUser}" -PbintrayKey="${bintrayKey}" -PsonatypeUsername="${sonatypeUsername}" -PsonatypePassword="${sonatypePassword}" build snapshot --info --debug
1010
elif [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_TAG" != "" ]; then
1111
echo -e 'Build Branch for Release => Branch ['$TRAVIS_BRANCH'] Tag ['$TRAVIS_TAG']'
1212
case "$TRAVIS_TAG" in
1313
*-rc\.*)
14-
./gradlew -Prelease.travisci=true -Prelease.useLastTag=true -PbintrayUser="${bintrayUser}" -PbintrayKey="${bintrayKey}" -PsonatypeUsername="${sonatypeUsername}" -PsonatypePassword="${sonatypePassword}" candidate --stacktrace
14+
./gradlew -Prelease.travisci=true -Prelease.useLastTag=true -PbintrayUser="${bintrayUser}" -PbintrayKey="${bintrayKey}" -PsonatypeUsername="${sonatypeUsername}" -PsonatypePassword="${sonatypePassword}" -PnetflixossAltCandidateRepo=true candidate
1515
;;
1616
*)
17-
./gradlew -Prelease.travisci=true -Prelease.useLastTag=true -PbintrayUser="${bintrayUser}" -PbintrayKey="${bintrayKey}" -PsonatypeUsername="${sonatypeUsername}" -PsonatypePassword="${sonatypePassword}" final --stacktrace
17+
./gradlew -Prelease.travisci=true -Prelease.useLastTag=true -PbintrayUser="${bintrayUser}" -PbintrayKey="${bintrayKey}" -PsonatypeUsername="${sonatypeUsername}" -PsonatypePassword="${sonatypePassword}" final
1818
;;
1919
esac
2020
else
2121
echo -e 'WARN: Should not be here => Branch ['$TRAVIS_BRANCH'] Tag ['$TRAVIS_TAG'] Pull Request ['$TRAVIS_PULL_REQUEST']'
22-
./gradlew build --stacktrace
22+
./gradlew build
2323
fi

gradle/wrapper/gradle-wrapper.jar

1.76 KB
Binary file not shown.

installViaTravis.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/bin/bash
2+
# This script will build dyno project.
3+
4+
if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
5+
echo -e "Assemble Pull Request #$TRAVIS_PULL_REQUEST => Branch [$TRAVIS_BRANCH]"
6+
./gradlew assemble
7+
elif [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_TAG" == "" ]; then
8+
echo -e 'Assemble Branch with Snapshot => Branch ['$TRAVIS_BRANCH']'
9+
./gradlew -Prelease.travisci=true assemble
10+
elif [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_TAG" != "" ]; then
11+
echo -e 'Assemble Branch for Release => Branch ['$TRAVIS_BRANCH'] Tag ['$TRAVIS_TAG']'
12+
./gradlew -Prelease.travisci=true -Prelease.useLastTag=true assemble
13+
else
14+
echo -e 'WARN: Should not be here => Branch ['$TRAVIS_BRANCH'] Tag ['$TRAVIS_TAG'] Pull Request ['$TRAVIS_PULL_REQUEST']'
15+
./gradlew assemble
16+
fi

0 commit comments

Comments
 (0)