Merge pull request #7604 from spalger/implement/versionedCiScript
[ci] split unit and selenium tasks into separate jenkins scripts
This commit is contained in:
commit
46c1118e30
|
@ -2,7 +2,14 @@ import { compact } from 'lodash';
|
|||
import { delimiter } from 'path';
|
||||
|
||||
module.exports = function (grunt) {
|
||||
grunt.registerTask('jenkins', 'Jenkins build script', function () {
|
||||
// TODO: remove after migration to new CI is complete
|
||||
grunt.registerTask('jenkins', [
|
||||
'rejectRejFiles',
|
||||
'test',
|
||||
process.env.JOB_NAME === 'kibana_core' ? 'build' : null
|
||||
]);
|
||||
|
||||
grunt.registerTask('jeknins:env', () => {
|
||||
// make sure JAVA_HOME points to JDK8
|
||||
const HOME = '/usr/lib/jvm/jdk8';
|
||||
process.env.JAVA_HOME = HOME;
|
||||
|
@ -11,12 +18,23 @@ module.exports = function (grunt) {
|
|||
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
|
||||
]));
|
||||
});
|
||||
|
||||
grunt.registerTask('jenkins:unit', [
|
||||
'jenkins:env',
|
||||
'rejectRejFiles',
|
||||
|
||||
'lint:source',
|
||||
'test:server',
|
||||
'test:browser',
|
||||
'test:api',
|
||||
]);
|
||||
|
||||
grunt.registerTask('jenkins:selenium', [
|
||||
'jenkins:env',
|
||||
'rejectRejFiles',
|
||||
|
||||
'test:ui'
|
||||
]);
|
||||
|
||||
};
|
||||
|
|
7
test/scripts/jenkins_selenium.sh
Normal file
7
test/scripts/jenkins_selenium.sh
Normal file
|
@ -0,0 +1,7 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
"$(dirname $0)/jenkins_setup.sh"
|
||||
|
||||
xvfb-run "$(npm bin)/grunt" jenkins:selenium;
|
|
@ -4,4 +4,4 @@ set -e
|
|||
|
||||
"$(dirname $0)/jenkins_setup.sh"
|
||||
|
||||
"$(npm bin)/grunt" jenkins;
|
||||
"$(npm bin)/grunt" jenkins:unit;
|
||||
|
|
Loading…
Reference in a new issue