Skip to content

Commit

Permalink
Use travis jobs to structure build and deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
muuki88 committed Aug 25, 2018
1 parent d0d7660 commit 2aa9366
Showing 1 changed file with 88 additions and 58 deletions.
146 changes: 88 additions & 58 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,26 @@ language: java
scala: 2.12.6
os: linux

addons:
apt:
packages:
- rpm
- fakeroot

sudo: false
cache:
apt: true
directories:
- $HOME/.sbt
- $HOME/.m2
- $HOME/.ivy2

env:
global:
- secure: bK5zEd2s3y+ScGwuGcxlP0tXx83nvurmF/SWuQSmI0A2KRelipGSSY2BTa+URKk9smJusJIZUi72EqEwMHDhxLCfHomjze5BmpJB5Mr3fQI700nxPEA95cbM4Z1G9+K6fYWy2pi5S7Xmz1Sg07bP4sfzyVYlNB20aquLCmB9Llk=
- secure: iY6MLAx39wW8y4uPZxt86FiNkLdrVHaAKCIcp7P35c0Zi1T0aaPTVTwZMS1uJAYs7e3Nh7gv7yU0hZR6t3klYPNjQdS7LHTgITIejBmikkBTkVqfpIYEOyrfDSaT59YlGrBiidegEGnw84kD4dFDmjnUY0ViCwOpJKr0a0Iokls=


before_install:
# travis sets the java options which breaks tests that check the applied memory settings
- unset _JAVA_OPTIONS
Expand All @@ -12,63 +32,73 @@ before_install:
fi
script: sbt "$SBT_TEST_CMD";

# We explicitly set the matrix to include oraclejdk8 because MacOS X has issues. See comment below
matrix:
jobs:
include:
- jdk: oraclejdk8
language: scala
env: SBT_TEST_CMD="^validate"
- jdk: oraclejdk8
language: scala
env: SBT_TEST_CMD="^validateUniversal"
- jdk: oraclejdk8
language: scala
env: SBT_TEST_CMD="^validateJar"
- jdk: oraclejdk8
language: scala
env: SBT_TEST_CMD="^validateBash"
- jdk: oraclejdk8
language: scala
env: SBT_TEST_CMD="^validateAsh"
- jdk: oraclejdk8
language: scala
env: SBT_TEST_CMD="^validateRpm"
- jdk: oraclejdk8
language: scala
env: SBT_TEST_CMD="^validateDebian"
# for now we can't test the docker image generation on travis
- jdk: oraclejdk8
language: scala
env: SBT_TEST_CMD="^validateDockerUnit"
# jdk packaging is only available on jdk8+
- jdk: oraclejdk8
language: scala
env: SBT_TEST_CMD="^validateJdkPackagerTravis"
# oraclejdk8 is not yet available.
# see https://github.com/travis-ci/travis-ci/issues/2316
- os: osx
env: SBT_TEST_CMD="^validateOSX"
osx_image: xcode8
# docker configuration as described in
# https://docs.travis-ci.com/user/docker/
- jdk: oraclejdk8
services: docker
sudo: required
env: SBT_TEST_CMD="^validateDocker"
# workaround for https://github.com/travis-ci/travis-ci/issues/4527
before_script:
- curl -L --create-dirs -o $HOME/.sbt/launchers/1.1.6/sbt-launch.jar http://dl.bintray.com/sbt/maven-releases/org/scala-sbt/sbt-launch/1.1.6/sbt-launch.jar
- stage: validate
matrix:
include:
- jdk: oraclejdk8
language: scala
env: SBT_TEST_CMD="^validate"
- stage: scripted
# We explicitly set the matrix to include oraclejdk8 because MacOS X has issues. See comment below
matrix:
include:
- jdk: oraclejdk8
language: scala
env: SBT_TEST_CMD="^validateUniversal"
- jdk: oraclejdk8
language: scala
env: SBT_TEST_CMD="^validateJar"
- jdk: oraclejdk8
language: scala
env: SBT_TEST_CMD="^validateBash"
- jdk: oraclejdk8
language: scala
env: SBT_TEST_CMD="^validateAsh"
- jdk: oraclejdk8
language: scala
env: SBT_TEST_CMD="^validateRpm"
- jdk: oraclejdk8
language: scala
env: SBT_TEST_CMD="^validateDebian"
# for now we can't test the docker image generation on travis
- jdk: oraclejdk8
language: scala
env: SBT_TEST_CMD="^validateDockerUnit"
# jdk packaging is only available on jdk8+
- jdk: oraclejdk8
language: scala
env: SBT_TEST_CMD="^validateJdkPackagerTravis"
# oraclejdk8 is not yet available.
# see https://github.com/travis-ci/travis-ci/issues/2316
- os: osx
env: SBT_TEST_CMD="^validateOSX"
osx_image: xcode8
# docker configuration as described in
# https://docs.travis-ci.com/user/docker/
- jdk: oraclejdk8
services: docker
sudo: required
env: SBT_TEST_CMD="^validateDocker"
# workaround for https://github.com/travis-ci/travis-ci/issues/4527
before_script:
- curl -L --create-dirs -o $HOME/.sbt/launchers/1.1.6/sbt-launch.jar http://dl.bintray.com/sbt/maven-releases/org/scala-sbt/sbt-launch/1.1.6/sbt-launch.jar
- stage: deploy
before_deploy:
- gpg --import project/.gnupg/key.asc
- gem install github_changelog_generator

addons:
apt:
packages:
- rpm
- fakeroot

sudo: false
cache:
apt: true
directories:
- $HOME/.sbt
- $HOME/.m2
- $HOME/.ivy2
deploy:
- provider: script
script: sbt release
skip_cleanup: true
on:
tags: true
condition: $TRAVIS_PULL_REQUEST = false
- provider: script
script: sbt release
skip_cleanup: true
on:
branch: snapshot
condition: $TRAVIS_PULL_REQUEST = false

0 comments on commit 2aa9366

Please sign in to comment.