I have this configuration in the .Travis.yml file, but Travis-CI still runs in Java 1.7. How can this problem be solved?
language: java
jdk:
- oraclejdk8
The problem is due to container-based infrastructure. For now it doesn't provide "oraclejdk8". I found the issue reading this post: https://github.com/jruby/jruby/issues/2313
To solve the problem avoid the use container-based infrastructure using sudo: required
# enable build for java8 - not working with container-based infrastructure for now
sudo: required
language: java
jdk:
- oraclejdk8
For more information about container-based infrastructure read:
http://docs.travis-ci.com/user/migrating-from-legacy/?utm_source=legacy-notice&utm_medium=banner&utm_campaign=legacy-upgrade
http://docs.travis-ci.com/user/workers/container-based-infrastructure/
To avoid other problems I suggest you to validate your file using http://lint.travis-ci.org/
Related
I need to be using version 5.4.0.201 of mono in order for netstandard to work correctly (as per: https://github.com/cake-build/cake/issues/2063)
In my travis.yml I tried specifying: mono: 5.4.0.201 however travis doesn't seem to recognise that as a valid mono version. What is the best / easiest way (if any) to overcome this? This is an open source project https://travis-ci.org/GitTools/GitVersion/jobs/362727450
Try changing Travis yml mono segment to
mono:
- 5.4.1
- latest
I have configured github repository for travis-ci, ref .travis.yml
It takes almost two minutes to build, travis is busy with the actions like this:
Is there a way to speed-up the process? I have read Migrating from legacy to container-based infrastructure but seems that simply "sudo: false" does not work. Can I do something else?
You can get rid of updating libc by moving to the trusty environment. The following will probably have least overhead:
sudo: false
dist: trusty
I have an application built on Grails 2.5.3 (https://github.com/ppazos/cabolabs-ehrserver).
I'm trying to integrate Travis-CI to run the tests of my app when I do a commit to GitHub. Here is my travis config file (the one I ended after a couple of hours of trial and error without luck): https://github.com/ppazos/cabolabs-ehrserver/blob/master/.travis.yml
language: groovy
sudo: false
jdk:
- oraclejdk7
env:
- GRAILS_VERSION=2.5.3
before_install:
- rm -rf ~/.gvm
- curl -s get.sdkman.io | bash
- source "$HOME/.sdkman/bin/sdkman-init.sh"
- echo sdkman_auto_answer=true > ~/.sdkman/etc/config
- source "/home/travis/.sdkman/bin/sdkman-init.sh"
# dev null is to avoid the need for user input https://github.com/sdkman/sdkman-cli/issues/101
- sdk install grails $GRAILS_VERSION < /dev/null
- sdk use grails $GRAILS_VERSION
- grails -version
- sdk current grails
branches:
only:
- master
script: sdk use grails $GRAILS_VERSION &&
grails upgrade --non-interactive &&
grails clean &&
grails test-app -integration
The problem is that even sdkman reports that is using Grails 2.5.3 and grails version says the same, when the app is executed, I see this on Travis-CI UI:
|Loading Grails 2.4.4
|Configuring classpath
|Running pre-compiled script
It also tries to install old versions of plugins, not the version I have in my BuildConfig.
Here is the full output of the Travis-CI build:
https://travis-ci.org/ppazos/cabolabs-ehrserver
I'm new to Travis-CI and I don't seem to find the problem, any help is very welcome!
I previously used SDKMAN (AKA GVM) to build my Grails projects on Travis, but using the Grails wrapper is a more reliable, simpler, and faster solution. Here's my Grails 2.5.1 project that I build with the Grails wrapper - notice that the Travis script is much simpler than yours, and because I don't need to install SDKMAN and Grails each time the build is run, it ought to be much faster.
All you need to do is commit the wrapper dir, and the scripts grailsw and grailsw.bat - don't copy them from my project, use those that are generated for a Grails 2.5.3 project (because they might have changed since Grails 2.5.1).
The main problem was that I had an old pom.xml file in the project root and didn't knew that Travis-CI was using that to build the project. After I updated the pom (https://github.com/ppazos/cabolabs-ehrserver/commit/97d080bf9f7459732ca04faac10e6ae96d6ee3b3) it started to take the right version of Grails, v2.5.3, but another problem arose:
I have a JAR in my /lib folder that wasn't loaded by Maven, so the build failed because the missing classes. That is an internal lib developed my myself and it is only to be used by a couple of projects, so it is not published on any Maven repo.
Looking on the web, couldn't find any solution that works just to make Maven consider my JAR.
I've setup two Java projects with the same .travis.yml file.
One works fine, one fails, because it appears that they're using different workers. One fails with
Fails: https://travis-ci.org/prism/Bedrock/jobs/110693590
"Sorry, but JDK 'openjdk8' is not known."
Works: https://travis-ci.org/prism/Prism/jobs/110620073
Another, using oraclejdk8 fails with checkstyle errors, yet checkstyle when run locally has no problems.
I can't find any information as to why the workers would be different, and openjdk8 is unknown in one vm, but not a problem in another.
Our config:
dist: trusty
install: true
language: java
jdk:
- oraclejdk8
script: gradle build
How can is specify: language: none in .travis.yml?
I don't specify a language, and get Ruby by default.
i have no Ruby. I'm using C, C++, Ocaml, Python, and Felix.
The build script is just "make".
You can set language: minimal or language: generic which are not language specific.
From the documentation:
minimal has some essential CI tools and Python:
version control tools
essential build tools such as gcc and make
network tools such as curl and essential
Docker
python
generic extends minimal and additionally includes:
databases and services
go
jvm
node_js
php
ruby
Start with setting language: c
https://docs.travis-ci.com/user/customizing-the-build/
https://docs.travis-ci.com/user/languages/c
You might run into problems as per https://github.com/travis-ci/travis-ci/issues/4090