Skip to content

Commit

Permalink
Adding publishing to gh-pages during CI builds (#404)
Browse files Browse the repository at this point in the history
  • Loading branch information
tgianos committed Sep 29, 2016
1 parent 1eac7d7 commit 70d6bcd
Show file tree
Hide file tree
Showing 7 changed files with 46 additions and 12 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ env:
- secure: g8oRT4YUr2VyO6h8+Pm+MvSgPyfEtd+ndCxF70F0SUj5eNV9SFt7yYOn6V6Mxx9eEyZMQSdPed+70+94Nd8yD+cjIGHNnlvKt6V/Q4i09XxhT3/ZiM8B9qRd1eGON0mEaU5Bl+918CGEIVCVsfLPGLVpItaSz2Tda46EDOdRHO8=
- secure: c0LFCj1KBTEIFSWlpRGgaei86bfrpnSr8qmMOu/S4dl2JRnCnW9AHmrmQzYhd5NlNPugOAncYk9lnkxA7xqtDlv/Ih4YKBaeP924hwLWO//0tKgxhF1dr0dHI+bRKURvcSyLXFDNFjuXUrw4SalBLbZCmiNFzJLMmy2Lvs9UTso=
- secure: Nv1mMLy2XX+bYziq536KbNg/mAVDTaLw3q3bKP2Mil3JVicXxYVbkEo+DK2O4rsuT7JNbyroN6/3x7xT9qBo4X7vzCjU91QUAxq5t0SmG0FW+oAIApHWTum307b5XS2UyqV/88gg1O6g9or3bKmDLUsJ1A/+fsASozA207a7zls=
- secure: "azkmD+d2nSitHJS8AB/L2aAJyiUDBa8tQX4c/gzC/dZHkSUBslyAbGz7OyLWt31JF1WdlNpoWel1gp2/nNoi8W5s46N5z9yYMbGONJUAqaUNWYDfjrLqRtUDPAoo39zARUfsuKPu9Bqt+ZEjb5jiHwj9CRBoejkdbFdPdMNziwA="
notifications:
slack:
secure: H5nS+GX6TYTU27ur6YFG5OgrQeUbzXLok5ub6+xcmyYEeVPpnQ1Gg/wKqTAGsP9j6tAkqPpxgYT9i9Do6eyTEplK6bTvQVyhilsEDtxGJbUO8XOE9TSo6jAe/lD3EB5l46gxFID+Hg9IkPii4LwEabP7PVehrB1JfNZ6QDgSRRM=
37 changes: 33 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ buildscript {
classpath("io.spring.gradle:dependency-management-plugin:0.6.0.RELEASE")
classpath("org.asciidoctor:asciidoctor-gradle-plugin:1.5.3")
classpath("gradle.plugin.com.gorylenko.gradle-git-properties:gradle-git-properties:1.4.11")
classpath("com.netflix.nebula:gradle-aggregate-javadocs-plugin:3.0.1")
}
}

Expand All @@ -22,6 +23,8 @@ plugins {
id "org.ajoberstar.github-pages" version "1.6.0-rc.1"
}

apply plugin: "nebula-aggregate-javadocs"

ext.githubProjectName = rootProject.name

allprojects {
Expand All @@ -45,6 +48,10 @@ idea {
}
}

task clean(type: Delete) {
delete "build"
}

subprojects {
apply plugin: "nebula.netflixoss"
apply plugin: "java"
Expand Down Expand Up @@ -186,10 +193,6 @@ subprojects {
}
}

task clean(type: Delete) {
delete "build"
}

task jacocoRootReport(type: JacocoReport, group: "Coverage reports") {
group = "Coverage Reports"
dependsOn subprojects.test
Expand Down Expand Up @@ -225,3 +228,29 @@ tasks.coveralls {
System.env."CI"
}
}

githubPages {
credentials {
username = System.getenv("GH_TOKEN")
password = ""
}
pages {
from "${project.buildDir}/docs/javadoc"
// by default this will copy into the root of the gh-pages branch and delete any previous files
// customizing the destination will only delete files within that target dir
into "docs/${version}/javadoc"
}
}

prepareGhPages {
dependsOn "aggregateJavadocs"
onlyIf {
System.env."CI"
}
}

publishGhPages {
onlyIf {
System.env."CI"
}
}
8 changes: 4 additions & 4 deletions genie-client/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ dependencies {

compile project(":genie-common")

compile("commons-beanutils:commons-beanutils:1.9.2")
compile("com.squareup.retrofit2:retrofit:2.0.1")
compile("com.squareup.retrofit2:converter-jackson:2.0.1")
compile("org.apache.commons:commons-configuration2:2.0")
compile("commons-beanutils:commons-beanutils")
compile("com.squareup.retrofit2:retrofit:${retrofit_version}")
compile("com.squareup.retrofit2:converter-jackson:${retrofit_version}")
compile("org.apache.commons:commons-configuration2:${commons_configuration2_version}")

// Logging
compile("org.slf4j:slf4j-api")
Expand Down
1 change: 0 additions & 1 deletion genie-core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ dependencies {
// AWS Libs
compile("com.amazonaws:aws-java-sdk-sts:${aws_java_sdk_sts_version}")


/*******************************
* Provided Dependencies
*******************************/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ public AuthenticationManager authenticationManagerBean() throws Exception {
* Configure the global authentication manager.
*
* @param auth The builder to configure
* @throws Exception on error
*/
@Autowired
protected void configureGlobal(final AuthenticationManagerBuilder auth) throws Exception {
Expand Down
4 changes: 4 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
## Library Versions

commons_exec_version=1.3
commons_configuration2_version=2.0

# JWT Related Libraries
jose4j_version=0.5.2
Expand All @@ -35,6 +36,9 @@ aws_java_sdk_sts_version=1.10.30
# Netflix Libraries
spectator_version=0.30.0

# Retrofit Version
retrofit_version=2.0.1

# Swagger Libraries
springfox_version=2.4.0

Expand Down
6 changes: 3 additions & 3 deletions gradle/buildViaTravis.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
./gradlew build coveralls --info
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 coveralls --info
./gradlew -Prelease.travisci=true -PbintrayUser="${bintrayUser}" -PbintrayKey="${bintrayKey}" -PsonatypeUsername="${sonatypeUsername}" -PsonatypePassword="${sonatypePassword}" build snapshot coveralls publishGhPages --info
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 coveralls --info
./gradlew -Prelease.travisci=true -Prelease.useLastTag=true -PbintrayUser="${bintrayUser}" -PbintrayKey="${bintrayKey}" -PsonatypeUsername="${sonatypeUsername}" -PsonatypePassword="${sonatypePassword}" candidate coveralls publishGhPages --info
;;
*)
./gradlew -Prelease.travisci=true -Prelease.useLastTag=true -PbintrayUser="${bintrayUser}" -PbintrayKey="${bintrayKey}" -PsonatypeUsername="${sonatypeUsername}" -PsonatypePassword="${sonatypePassword}" final coveralls --info
./gradlew -Prelease.travisci=true -Prelease.useLastTag=true -PbintrayUser="${bintrayUser}" -PbintrayKey="${bintrayKey}" -PsonatypeUsername="${sonatypeUsername}" -PsonatypePassword="${sonatypePassword}" final coveralls publishGhPages --info
;;
esac
else
Expand Down

0 comments on commit 70d6bcd

Please sign in to comment.