diff --git a/.travis.yml b/.travis.yml index dec6e2dc..241214e0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,3 +1,15 @@ -language: java -jdk: - - openjdk6 \ No newline at end of file +language: java +jdk: +- oraclejdk7 +sudo: false +install: "./installViaTravis.sh" +script: "./buildViaTravis.sh" +cache: + directories: + - "$HOME/.gradle/caches" +env: + global: + - secure: bke/O6ab20cwJTplmrlkleaBp33SbdqRBEHWBwRi14pdw1xPeKCVXzh7Ic9lGf/BPGN5/Q3K6hc3BV13wqqtcKi3jmV3MrFiKS3oF9cRm93ON1BfAEy2WAoRUvTfhIpLJV9P6gXSpx8rTegTxxpQjlRAp3w6L+4paTj4GzTwy60= + - secure: LbElewZRfaeZ5l6Dv83PEHJJXQbUkiWpwHyg8Ayw9bIMnocr67FvCP7durVVSFVSSirgSE0+h+rNixnwKs+QMiXWd5CL7e/JkultCj0vFQTnQDQ3jO8gMIEz6hQPtabk1vHLqFyS+8ccyMN7EyoIK/h+XPc1ICWPoAa28E52X0s= + - secure: Mf3ssCZsnxJOjODZpD8r9TM5fnQNlYQtDm4gIF83D8pzKh25zHcBglkIxSnIGJCTpLXnB8kEsTjvFqOubOeq3K8n/zMgwIwBzQjDcfYhdYFtHAKPZOOFSmAwecmqLeJWE1Hd9Bn6Jr8ttPhY/RX5X2ECqUW7QioShP4su8DmUXY= + - secure: fK7FeS21O0tykrXu1XeMAG17v75iTSFS2FgG64LyVES6PKFR3NxeKl7sNHULFENC0SIEVKAKVNzqxaFBQGg3tF/8OaP2FJNvgJFLK+cw65n3qRUxEHNZ1fgQOM8q6yL562YjwYZtCY1dd8m4G/E1aWAEDOBfr37vNXbIxpbrXg0= diff --git a/README.md b/README.md index e9c06efa..f8a922e3 100644 --- a/README.md +++ b/README.md @@ -3,8 +3,10 @@ The Simian Army is a suite of tools for keeping your cloud operating in top form. Chaos Monkey, the first member, is a resiliency tool that helps ensure that your applications can tolerate random instance failures -## CloudBees build status -[![Build Status](https://netflixoss.ci.cloudbees.com/job/SimianArmy-master/badge/icon)](https://netflixoss.ci.cloudbees.com/job/SimianArmy-master/) +## Build status + +[![Build Status](https://travis-ci.org/Netflix/SimianArmy.svg?branch=master)](https://travis-ci.org/Netflix/SimianArmy) +[![Apache 2.0](https://img.shields.io/github/license/Netflix/SimianArmy.svg)](http://www.apache.org/licenses/LICENSE-2.0) ## DETAILS @@ -16,7 +18,7 @@ Please see the [wiki](https://github.com/Netflix/SimianArmy/wiki). ## LICENSE -Copyright 2012 Netflix, Inc. +Copyright 2012-2016 Netflix, Inc. Licensed 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 diff --git a/build.gradle b/build.gradle index cd5b00a6..d61cbc71 100644 --- a/build.gradle +++ b/build.gradle @@ -1,5 +1,11 @@ +buildscript { + repositories { + jcenter() + } +} + plugins { - id 'nebula.netflixoss' version '2.2.9' + id 'nebula.netflixoss' version '3.2.3' id 'net.saliman.cobertura' version '2.2.7' id 'com.github.hierynomus.license' version '0.11.0' } diff --git a/buildViaTravis.sh b/buildViaTravis.sh new file mode 100755 index 00000000..17a33a5f --- /dev/null +++ b/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 -PbintrayUser="${bintrayUser}" -PbintrayKey="${bintrayKey}" -PsonatypeUsername="${sonatypeUsername}" -PsonatypePassword="${sonatypePassword}" build 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 -PbintrayUser="${bintrayUser}" -PbintrayKey="${bintrayKey}" -PsonatypeUsername="${sonatypeUsername}" -PsonatypePassword="${sonatypePassword}" candidate + ;; + *) + ./gradlew -Prelease.travisci=true -Prelease.useLastTag=true -PbintrayUser="${bintrayUser}" -PbintrayKey="${bintrayKey}" -PsonatypeUsername="${sonatypeUsername}" -PsonatypePassword="${sonatypePassword}" final + ;; + esac +else + echo -e 'WARN: Should not be here => Branch ['$TRAVIS_BRANCH'] Tag ['$TRAVIS_TAG'] Pull Request ['$TRAVIS_PULL_REQUEST']' + ./gradlew build +fi diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index c97a8bdb..5ccda13e 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 2d7affd9..dd67fa8d 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Thu Jan 29 13:45:16 PST 2015 +#Mon Feb 22 15:12:15 PST 2016 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-2.2.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-2.11-bin.zip diff --git a/gradlew b/gradlew index 91a7e269..9d82f789 100755 --- a/gradlew +++ b/gradlew @@ -42,11 +42,6 @@ case "`uname`" in ;; esac -# For Cygwin, ensure paths are in UNIX format before anything is touched. -if $cygwin ; then - [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"` -fi - # Attempt to set APP_HOME # Resolve links: $0 may be a link PRG="$0" @@ -61,9 +56,9 @@ while [ -h "$PRG" ] ; do fi done SAVED="`pwd`" -cd "`dirname \"$PRG\"`/" >&- +cd "`dirname \"$PRG\"`/" >/dev/null APP_HOME="`pwd -P`" -cd "$SAVED" >&- +cd "$SAVED" >/dev/null CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar @@ -114,6 +109,7 @@ fi if $cygwin ; then APP_HOME=`cygpath --path --mixed "$APP_HOME"` CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` + JAVACMD=`cygpath --unix "$JAVACMD"` # We build the pattern for arguments to be converted via cygpath ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` diff --git a/gradlew.bat b/gradlew.bat index aec99730..72d362da 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -46,7 +46,7 @@ echo location of your Java installation. goto fail :init -@rem Get command-line arguments, handling Windowz variants +@rem Get command-line arguments, handling Windows variants if not "%OS%" == "Windows_NT" goto win9xME_args if "%@eval[2+2]" == "4" goto 4NT_args diff --git a/installViaTravis.sh b/installViaTravis.sh new file mode 100755 index 00000000..0c167585 --- /dev/null +++ b/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 --stacktrace +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