Skip to content

Commit

Permalink
[bootstrap] No longer build TS refs automatically
Browse files Browse the repository at this point in the history
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
  • Loading branch information
Tyler Smalley committed Feb 18, 2021
1 parent 31810c6 commit 4435a31
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 1 deletion.
4 changes: 4 additions & 0 deletions packages/kbn-pm/dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}
}

};
Expand Down
6 changes: 6 additions & 0 deletions packages/kbn-pm/src/commands/bootstrap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'
);
}
},
};
5 changes: 4 additions & 1 deletion scripts/build_ts_refs.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,7 @@
*/

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();
}
6 changes: 6 additions & 0 deletions test/scripts/jenkins_build_ts_refs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env bash

source src/dev/ci_setup/setup_env.sh

echo " -> building Typescript References"
node scripts/build_ts_refs.js
5 changes: 5 additions & 0 deletions vars/kibanaPipeline.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -425,6 +425,10 @@ def buildXpackPlugins() {
runbld('./test/scripts/jenkins_xpack_build_plugins.sh', 'Build X-Pack Plugins')
}

def buildTypescriptRefs() {
runbld('./test/scripts/jenkins_build_ts_refs.sh', 'Build Typescript References')
}

def withTasks(Map params = [worker: [:]], Closure closure) {
catchErrors {
def config = [name: 'ci-worker', size: 'xxl', ramDisk: true] + (params.worker ?: [:])
Expand All @@ -441,6 +445,7 @@ def withTasks(Map params = [worker: [:]], Closure closure) {
// There are integration tests etc that require the plugins to be built first, so let's go ahead and build them before set up the parallel workspaces
ossPlugins: { buildOssPlugins() },
xpackPlugins: { buildXpackPlugins() },
buildTSRefs: { buildTypescriptRefs() },
])

catchErrors {
Expand Down

0 comments on commit 4435a31

Please sign in to comment.