diff --git a/packages/kbn-pm/dist/index.js b/packages/kbn-pm/dist/index.js index 1b8bd4784e5833..7f98f26be94fff 100644 --- a/packages/kbn-pm/dist/index.js +++ b/packages/kbn-pm/dist/index.js @@ -8984,6 +8984,10 @@ const BootstrapCommand = { _utils_log__WEBPACK_IMPORTED_MODULE_2__["log"].success(`[${project.name}] bootstrap complete`); } }); + + if (!process.env.BUILD_TS_REFS_ON_BOOTSTRAP) { + _utils_log__WEBPACK_IMPORTED_MODULE_2__["log"].info('For IDE TypeScript support run `node scripts/build_ts_refs` or set BUILD_TS_REFS_ON_BOOTSTRAP=true'); + } } }; diff --git a/packages/kbn-pm/src/commands/bootstrap.ts b/packages/kbn-pm/src/commands/bootstrap.ts index 98fcd71c3ac388..10dbe37b1cff3a 100644 --- a/packages/kbn-pm/src/commands/bootstrap.ts +++ b/packages/kbn-pm/src/commands/bootstrap.ts @@ -111,5 +111,11 @@ export const BootstrapCommand: ICommand = { log.success(`[${project.name}] bootstrap complete`); } }); + + if (!process.env.BUILD_TS_REFS_ON_BOOTSTRAP) { + log.info( + 'For IDE TypeScript support run `node scripts/build_ts_refs` or set BUILD_TS_REFS_ON_BOOTSTRAP=true' + ); + } }, }; diff --git a/scripts/build_ts_refs.js b/scripts/build_ts_refs.js index a4ee6ec491ef15..b3d05bfa819bee 100644 --- a/scripts/build_ts_refs.js +++ b/scripts/build_ts_refs.js @@ -7,4 +7,9 @@ */ require('../src/setup_node_env'); -require('../src/dev/typescript').runBuildRefsCli(); + +if (!process.env.npm_lifecycle_event || process.env.BUILD_TS_REFS_ON_BOOTSTRAP) { + require('../src/dev/typescript').runBuildRefsCli(); +} else { + console.warn('ran from yarn script without env BUILD_TS_REFS_ON_BOOTSTRAP=true'); +} diff --git a/test/scripts/jenkins_build_ts_refs.sh b/test/scripts/jenkins_build_ts_refs.sh new file mode 100644 index 00000000000000..b44ced61e3854e --- /dev/null +++ b/test/scripts/jenkins_build_ts_refs.sh @@ -0,0 +1,6 @@ +#!/usr/bin/env bash + +source src/dev/ci_setup/setup_env.sh + +checks-reporter-with-killswitch "Build Typescript References" \ + node scripts/build_ts_refs.js diff --git a/vars/tasks.groovy b/vars/tasks.groovy index f782ffdd8c5e69..a45bd7dcc41a68 100644 --- a/vars/tasks.groovy +++ b/vars/tasks.groovy @@ -18,6 +18,7 @@ def check() { kibanaPipeline.scriptTask('Verify NOTICE', 'test/scripts/checks/verify_notice.sh'), kibanaPipeline.scriptTask('Test Projects', 'test/scripts/checks/test_projects.sh'), kibanaPipeline.scriptTask('Test Hardening', 'test/scripts/checks/test_hardening.sh'), + kibanaPipeline.scriptTaskDocker('Build Typescript References', 'test/scripts/jenkins_build_ts_refs.sh'), ]) }