Skip to content

Commit

Permalink
[java][jenkins] ensure that JDK8 is in PATH
Browse files Browse the repository at this point in the history
  • Loading branch information
spalger committed Mar 21, 2016
1 parent f383827 commit f53b8c1
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions tasks/jenkins.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,18 @@
import { compact } from 'lodash';
import { delimiter } from 'path';

module.exports = function (grunt) {
let { compact } = require('lodash');
grunt.registerTask('jenkins', 'Jenkins build script', function () {
process.env.JAVA_HOME = '/usr/lib/jvm/jdk8';
// make sure JAVA_HOME points to JDK8
const HOME = '/usr/lib/jvm/jdk8';
process.env.JAVA_HOME = HOME;

// extend PATH to point to JDK8
const path = process.env.PATH.split(delimiter);
path.unshift(`${HOME}/bin`);
process.env.PATH = path.join(delimiter);

// always build os packages on jenkins
grunt.option('os-packages', true);

grunt.task.run(compact([
Expand Down

0 comments on commit f53b8c1

Please sign in to comment.