Skip to content

Commit

Permalink
Revert "Revert "[ci] skip building ts refs when not necessary (elasti…
Browse files Browse the repository at this point in the history
…c#95739)" (elastic#95746)" (elastic#95750)

Co-authored-by: spalger <spalger@users.noreply.github.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
  • Loading branch information
3 people committed Apr 19, 2021
1 parent b19c592 commit c69d990
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 5 deletions.
1 change: 1 addition & 0 deletions .ci/Jenkinsfile_baseline_capture
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ kibanaPipeline(timeoutMinutes: 210) {
) {
withGcpServiceAccount.fromVaultSecret('secret/kibana-issues/dev/ci-artifacts-key', 'value') {
withEnv([
'BUILD_TS_REFS_DISABLE=false', // disabled in root config so we need to override that here
'BUILD_TS_REFS_CACHE_ENABLE=true',
'BUILD_TS_REFS_CACHE_CAPTURE=true',
'DISABLE_BOOTSTRAP_VALIDATION=true',
Expand Down
4 changes: 0 additions & 4 deletions src/dev/ci_setup/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,6 @@ cp "src/dev/ci_setup/.bazelrc-ci" "$HOME/.bazelrc";
echo "# Appended by src/dev/ci_setup/setup.sh" >> "$HOME/.bazelrc"
echo "build --remote_header=x-buildbuddy-api-key=$KIBANA_BUILDBUDDY_CI_API_KEY" >> "$HOME/.bazelrc"

if [[ "$BUILD_TS_REFS_CACHE_ENABLE" != "true" ]]; then
export BUILD_TS_REFS_CACHE_ENABLE=false
fi

###
### install dependencies
###
Expand Down
2 changes: 1 addition & 1 deletion src/dev/typescript/build_ts_refs_cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const CACHE_WORKING_DIR = Path.resolve(REPO_ROOT, 'data/ts_refs_output_cache');
const TS_ERROR_REF = /\sTS\d{1,6}:\s/;

const isTypeFailure = (error: any) =>
error.exitCode === 1 &&
error.exitCode > 0 &&
error.stderr === '' &&
typeof error.stdout === 'string' &&
TS_ERROR_REF.test(error.stdout);
Expand Down
8 changes: 8 additions & 0 deletions test/scripts/checks/type_check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,13 @@

source src/dev/ci_setup/setup_env.sh

checks-reporter-with-killswitch "Build TS Refs" \
node scripts/build_ts_refs \
--ignore-type-failures \
--clean \
--no-cache \
--force \
--debug

checks-reporter-with-killswitch "Check Types" \
node scripts/type_check
1 change: 1 addition & 0 deletions vars/workers.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ def base(Map params, Closure closure) {
"TEST_BROWSER_HEADLESS=1",
"GIT_BRANCH=${checkoutInfo.branch}",
"TMPDIR=${env.WORKSPACE}/tmp", // For Chrome and anything else that respects it
"BUILD_TS_REFS_DISABLE=true", // no need to build ts refs in bootstrap
]) {
withCredentials([
string(credentialsId: 'vault-addr', variable: 'VAULT_ADDR'),
Expand Down

0 comments on commit c69d990

Please sign in to comment.