mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
[java][jenkins] ensure that JDK8 is in PATH
This commit is contained in:
parent
f383827890
commit
f53b8c1a27
1 changed files with 13 additions and 2 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue