Skip to content

Commit

Permalink
Deploy artifact and documentation snapshots from Travis
Browse files Browse the repository at this point in the history
  • Loading branch information
marcphilipp committed Sep 27, 2018
1 parent 6eb5531 commit 40e7ed3
Show file tree
Hide file tree
Showing 5 changed files with 48 additions and 22 deletions.
60 changes: 41 additions & 19 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,30 +14,52 @@ before_install:
- unset _JAVA_OPTIONS

install:
- echo "Don't let Travis CI execute './gradlew assemble' by default"
- ./gradlew --version # Display Gradle, Groovy, JVM and other versions

jdk:
- openjdk11
- openjdk-ea

os:
- linux
- osx

matrix:
include:
- os: linux
jdk: openjdk11
- os: linux
jdk: openjdk11
env: SCAN='--scan --stacktrace --warning-mode=all' JACOCO='-PenableJaCoCo' INSTALL='publishToMavenLocal'
exclude:
- os: osx
jdk: openjdk11
- os: linux
jdk: openjdk-ea
allow_failures:
- jdk: openjdk-ea

script:
# Display Gradle, Groovy, JVM and other versions
- ./gradlew --version
# Build JUnit 5
- ./gradlew ${SCAN} ${JACOCO} build ${INSTALL}

after_success:
# If variable JACOCO is set, run JaCoCo report and send report to codecov.io after build success
- test -v JACOCO && ./gradlew ${JACOCO} jacocoRootReport && bash <(curl -s https://codecov.io/bash) || true
# If variable INSTALL is set, run platform-tooling-support-tests checking the local installation
- test -v INSTALL && ./gradlew --scan --stacktrace -Dplatform.tooling.support.tests.enabled=true build || true
- ./gradlew --scan --warning-mode=all -Dplatform.tooling.support.tests.enabled=true build

stages:
- test
- name: deploy
if: branch = master

jobs:
include:
- name: "Coverage"
script:
- ./gradlew --scan --stacktrace --warning-mode=all -PenableJaCoCo build jacocoRootReport
- bash <(curl -s https://codecov.io/bash)
- stage: deploy
name: "Publish snapshot artifacts"
env:
# ORG_GRADLE_PROJECT_ossrhUsername
- secure: KB6nXD6SU+g7jNB+JnmOy9aOx21tazy+j2SbFj6UTayfEWfD3E7nw8AxQLRy9XWVaUQZGk+F8UWvHMX/5qhfqS3eXsdqGY3BaDM6QB8O3kMIZjO2I1JxmLoEBXqzWPFo0qfdexm78FhU3LCqzwofl4eCkwCErjF0483MfUOe54Q=
# ORG_GRADLE_PROJECT_ossrhPassword
- secure: haIyH2wZSfmnH/oKJ0J1pMBl1wsYMhc26iOPunaMELKUgPCBC4+y5qYJBcG3/G9gy3qYYi3GdFLvHVkqxlAABTC5lcNyBqsU20SzKD6HNyf4rv7Dtv+x1GjI7Yz50zAaJyPnoQBdboMdevPTfczcCAf6mRvA5nmEZc1D1fbbGA8=
script: ./gradlew --scan publish -x test
- name: "Update snapshot documentation"
jdk: openjdk10 # asciidoctor does currently not work on Java 11, see https://github.com/jruby/jruby-openssl/issues/175
addons:
apt:
packages:
- graphviz
env:
# GRGIT_USER
- secure: PwwKcsVdukfzvDBHmdajhMsIVHSbPt+lorgibpRXImBt+C4XHlaz/Z78Bq8jtkDvrXb+DTSfSGvAxg1IBM+rtCzrYb5DAqq+OfuG9Uu6FDTnkIOHs5Gii7pAfT0+W31Oj76OgiCAXX+p8lbFTchz6ope5zVYEpSlAe7aXCVTGM0=
script: ./gradlew --scan gitPublishPush
2 changes: 1 addition & 1 deletion documentation/documentation.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ dependencies {
}

asciidoctorj {
version = '1.5.6'
version = '1.5.7'
}

ext {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import static org.junit.jupiter.api.Assertions.assertTrue;

import java.nio.file.Paths;
import java.time.Duration;

import de.sormuras.bartholdy.tool.GradleWrapper;

Expand All @@ -31,10 +32,11 @@ void gradle_wrapper() {
.setTool(new GradleWrapper(Paths.get(".."))) //
.setProject("gradle-kotlin-extensions") //
.addArguments("build", "--no-daemon", "--debug", "--stacktrace") //
.setTimeout(Duration.ofMinutes(2)) //
.build() //
.run();

assertEquals(0, result.getExitCode());
assertEquals(0, result.getExitCode(), "result=" + result);
assertTrue(result.getOutputLines("out").stream().anyMatch(line -> line.contains("BUILD SUCCESSFUL")));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import static org.junit.jupiter.api.Assertions.assertTrue;

import java.nio.file.Paths;
import java.time.Duration;

import de.sormuras.bartholdy.tool.GradleWrapper;

Expand All @@ -31,6 +32,7 @@ void gradle_wrapper() {
.setTool(new GradleWrapper(Paths.get(".."))) //
.setProject("gradle-starter") //
.addArguments("build", "--no-daemon", "--debug", "--stacktrace") //
.setTimeout(Duration.ofMinutes(2)) //
.build() //
.run();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ void maven_3_5_4() {
.setTool(Maven.install("3.5.4", Paths.get("build", "test-tools"))) //
.setProject("maven-starter") //
.addArguments("--debug", "verify") //
.setTimeout(Duration.ofSeconds(99)) //
.setTimeout(Duration.ofMinutes(2)) //
.build() //
.run();

Expand Down

0 comments on commit 40e7ed3

Please sign in to comment.