2016-03-21 22:37:20 +01:00
|
|
|
import { compact } from 'lodash';
|
|
|
|
import { delimiter } from 'path';
|
|
|
|
|
2015-07-28 17:23:56 +02:00
|
|
|
module.exports = function (grunt) {
|
2016-07-01 20:38:30 +02:00
|
|
|
// TODO: remove after migration to new CI is complete
|
2016-07-01 21:00:39 +02:00
|
|
|
grunt.registerTask('jenkins', compact([
|
2016-07-01 20:57:06 +02:00
|
|
|
'jenkins:env',
|
2016-07-01 20:38:30 +02:00
|
|
|
'rejectRejFiles',
|
|
|
|
'test',
|
|
|
|
process.env.JOB_NAME === 'kibana_core' ? 'build' : null
|
2016-07-01 21:00:39 +02:00
|
|
|
]));
|
2016-07-01 20:38:30 +02:00
|
|
|
|
2016-07-01 21:10:16 +02:00
|
|
|
grunt.registerTask('jenkins:env', () => {
|
2016-03-21 22:37:20 +01:00
|
|
|
// 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);
|
2016-02-04 03:41:47 +01:00
|
|
|
});
|
2015-07-28 17:23:56 +02:00
|
|
|
|
2017-11-03 19:59:50 +01:00
|
|
|
grunt.registerTask('jenkins:docs', [
|
|
|
|
'docker:docs'
|
|
|
|
]);
|
|
|
|
|
2016-07-01 20:31:02 +02:00
|
|
|
grunt.registerTask('jenkins:unit', [
|
|
|
|
'jenkins:env',
|
|
|
|
'rejectRejFiles',
|
|
|
|
|
2017-11-14 18:11:59 +01:00
|
|
|
'run:eslint',
|
2016-07-26 01:51:45 +02:00
|
|
|
'licenses',
|
2016-07-01 20:31:02 +02:00
|
|
|
'test:server',
|
2017-04-06 03:24:01 +02:00
|
|
|
'test:jest',
|
2018-02-19 17:02:01 +01:00
|
|
|
'test:jest_integration',
|
2018-03-09 14:28:47 +01:00
|
|
|
'test:projects',
|
2016-09-02 00:02:43 +02:00
|
|
|
'test:browser-ci',
|
2016-07-01 20:31:02 +02:00
|
|
|
'test:api',
|
2018-02-12 22:40:47 +01:00
|
|
|
'verifyTranslations',
|
2016-07-01 20:31:02 +02:00
|
|
|
]);
|
|
|
|
|
2017-05-31 23:18:58 +02:00
|
|
|
grunt.config.set('functional_test_runner.functional.options.configOverrides.mochaOpts.bail', true);
|
2016-07-01 20:31:02 +02:00
|
|
|
grunt.registerTask('jenkins:selenium', [
|
|
|
|
'jenkins:env',
|
|
|
|
'rejectRejFiles',
|
|
|
|
|
2017-04-21 18:08:36 +02:00
|
|
|
'test:uiRelease'
|
2016-07-01 20:31:02 +02:00
|
|
|
]);
|
|
|
|
|
2015-07-28 17:23:56 +02:00
|
|
|
};
|