[java][jenkins] ensure that JDK8 is in PATH
This commit is contained in:
parent
f383827890
commit
f53b8c1a27
|
@ -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([
|
||||
|
|
Loading…
Reference in a new issue