1

I want to use Travis-CI with my Grails 3.0.9 app. For this I created a .travis.yml file:

language: groovy

jdk:
  - oraclejdk7

before_install:
 - curl -s get.sdkman.io | bash
 - source "$HOME/.sdkman/bin/sdkman-init.sh"
 - sdk install grails 3.0.9
 - sdk default grails 3.0.9

script: grails test-app --stacktrace

When the Travis-CI service wants to build my application, it ends up with this error:

$ export GRAILS_HOME=/home/travis/.sdkman/candidates/grails/3.0.9/
$ export PATH=$PATH:$GRAILS_HOME/bin
$ ./gradlew assemble
...
(downloading a lot of gradle dependencies)
...
BUILD SUCCESSFUL
$ grails test-app
/home/travis/build.sh: line 45: grails: command not found

So do I have to install Grails somehow else or is it because of a missing/wrong path variable?

Peter
  • 1,679
  • 2
  • 31
  • 60

1 Answers1

2

I've found a working .travis.yml here:

language: groovy

jdk:
  - oraclejdk7

before_install:
- curl -s http://get.sdkman.io | bash
- echo sdkman_auto_answer=true > ~/.sdkman/etc/config
- source "/home/travis/.sdkman/bin/sdkman-init.sh"
- sdk install grails 3.0.9

script: grails test-app --stacktrace

Update:

Use get.sdkman.io since get.gvmtool.net doesn't work anymore.

Peter
  • 1,679
  • 2
  • 31
  • 60
  • it seems get.gvmtool.net doesn't work anymore, and now is sdkman, do you know what is the required modification for travis to use sdkman? – Pablo Pazos Feb 23 '16 at 05:30