kibana/tasks/jenkins.js
Court Ewing 834f56392e Apply -snapshot suffix during build task
The default behavior of the build task is to now apply the -snapshot
suffix dynamically rather than us manually hardcoding and managing it
within the source code itself. The `--release` flag will drop the
-snapshot suffix on a build, which should be used for any release
candidate.

The default behavior of the build task has also changed to create
rpm/deb packages as well. Since we've only confirmed that this works on
linux, you can override that behavior by passing `skip-os-packages`.

If you do not want to create any zip or tar.gz archives, you can pass
`--skip-archives`.
2016-06-11 15:57:30 -04:00

23 lines
605 B
JavaScript

import { compact } from 'lodash';
import { delimiter } from 'path';
module.exports = function (grunt) {
grunt.registerTask('jenkins', 'Jenkins build script', function () {
// 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);
grunt.task.run(compact([
'rejectRejFiles',
'test',
process.env.JOB_NAME === 'kibana_core' ? 'build' : null
]));
});
};