diff --git a/tasks/build/index.js b/tasks/build/index.js index 22341871639d8..f136f89179ea2 100644 --- a/tasks/build/index.js +++ b/tasks/build/index.js @@ -1,31 +1,33 @@ module.exports = function (grunt) { let { flatten } = require('lodash'); - grunt.registerTask('build', flatten([ - '_build:getProps', - 'clean:build', - 'clean:target', - '_build:downloadNodeBuilds:start', - 'copy:devSource', - 'babel:build', - '_build:babelOptions', - '_build:installedPlugins', - '_build:packageJson', - '_build:readme', - '_build:installNpmDeps', - '_build:removePkgJsonDeps', - 'clean:testsFromModules', - 'clean:deepModuleBins', - 'clean:deepModules', - 'run:optimizeBuild', - 'stop:optimizeBuild', - '_build:downloadNodeBuilds:finish', - '_build:versionedLinks', - '_build:archives', - !grunt.option('os-packages') ? [] : [ - '_build:pleaseRun', - '_build:osPackages', - ], - '_build:shasums' - ])); + grunt.registerTask('build', 'Build packages', function (arg) { + grunt.task.run(flatten([ + '_build:getProps', + 'clean:build', + 'clean:target', + '_build:downloadNodeBuilds:start', + 'copy:devSource', + 'babel:build', + '_build:babelOptions', + '_build:installedPlugins', + '_build:packageJson', + '_build:readme', + '_build:installNpmDeps', + '_build:removePkgJsonDeps', + 'clean:testsFromModules', + 'clean:deepModuleBins', + 'clean:deepModules', + 'run:optimizeBuild', + 'stop:optimizeBuild', + '_build:downloadNodeBuilds:finish', + '_build:versionedLinks', + '_build:archives', + (grunt.option('os-packages') || arg === 'ospackages') ? [ + '_build:pleaseRun', + '_build:osPackages', + ] : [], + '_build:shasums' + ])); + }); }; diff --git a/tasks/jenkins.js b/tasks/jenkins.js index f043e92d0cc76..e3d3d9c3cc06d 100644 --- a/tasks/jenkins.js +++ b/tasks/jenkins.js @@ -3,7 +3,7 @@ module.exports = function (grunt) { grunt.registerTask('jenkins', 'Jenkins build script', compact([ 'test', - process.env.JOB_NAME === 'kibana_core' ? 'build' : null + process.env.JOB_NAME === 'kibana_core' ? 'build:ospackages' : null ])); };