Skip to content

Commit

Permalink
[ci] separate checks done in bootstrap as individual tasks (#93329)
Browse files Browse the repository at this point in the history
(cherry picked from commit b790f4ca1761bc1fab7818318213833a9c7d092f)

Co-authored-by: spalger <spalger@users.noreply.github.com>
  • Loading branch information
Spencer and spalger authored Mar 3, 2021
1 parent c42b994 commit bf8417e
Show file tree
Hide file tree
Showing 7 changed files with 73 additions and 69 deletions.
2 changes: 1 addition & 1 deletion .ci/Jenkinsfile_baseline_capture
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ kibanaPipeline(timeoutMinutes: 210) {
withEnv([
'BUILD_TS_REFS_CACHE_ENABLE=true',
'BUILD_TS_REFS_CACHE_CAPTURE=true',
'DISABLE_BOOTSTRAP_VALIDATIONS=true',
'DISABLE_BOOTSTRAP_VALIDATION=true',
]) {
kibanaPipeline.doSetup()
}
Expand Down
64 changes: 0 additions & 64 deletions src/dev/ci_setup/bootstrap_validations.sh

This file was deleted.

16 changes: 12 additions & 4 deletions src/dev/ci_setup/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,20 @@ if [[ "$BUILD_TS_REFS_CACHE_CAPTURE" == "true" ]]; then
cd "$KIBANA_DIR"
fi

if [[ "$DISABLE_BOOTSTRAP_VALIDATIONS" != "true" ]]; then
source "$KIBANA_DIR/src/dev/ci_setup/bootstrap_validations.sh"
fi

###
### Download es snapshots
###
echo " -- downloading es snapshot"
node scripts/es snapshot --download-only;

###
### verify no git modifications caused by bootstrap
###
if [[ "$DISABLE_BOOTSTRAP_VALIDATION" != "true" ]]; then
GIT_CHANGES="$(git ls-files --modified)"
if [ "$GIT_CHANGES" ]; then
echo -e "\n${RED}ERROR: 'yarn kbn bootstrap' caused changes to the following files:${C_RESET}\n"
echo -e "$GIT_CHANGES\n"
exit 1
fi
fi
19 changes: 19 additions & 0 deletions test/scripts/checks/kbn_pm_dist.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/usr/bin/env bash

source src/dev/ci_setup/setup_env.sh

###
### rebuild kbn-pm distributable to ensure it's not out of date
###
echo " -- building kbn-pm distributable"
yarn kbn run build -i @kbn/pm

###
### verify no git modifications
###
GIT_CHANGES="$(git ls-files --modified)"
if [ "$GIT_CHANGES" ]; then
echo -e "\n${RED}ERROR: 'yarn kbn run build -i @kbn/pm' caused changes to the following files:${C_RESET}\n"
echo -e "$GIT_CHANGES\n"
exit 1
fi
19 changes: 19 additions & 0 deletions test/scripts/checks/plugin_list_docs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/usr/bin/env bash

source src/dev/ci_setup/setup_env.sh

###
### rebuild plugin list to ensure it's not out of date
###
echo " -- building plugin list docs"
node scripts/build_plugin_list_docs

###
### verify no git modifications
###
GIT_CHANGES="$(git ls-files --modified)"
if [ "$GIT_CHANGES" ]; then
echo -e "\n${RED}ERROR: 'node scripts/build_plugin_list_docs' caused changes to the following files:${C_RESET}\n"
echo -e "$GIT_CHANGES\n"
exit 1
fi
19 changes: 19 additions & 0 deletions test/scripts/checks/plugin_public_api_docs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/usr/bin/env bash

source src/dev/ci_setup/setup_env.sh

###
### rebuild plugin api docs to ensure it's not out of date
###
echo " -- building api docs"
node scripts/build_api_docs

###
### verify no api changes
###
GIT_CHANGES="$(git ls-files --modified)"
if [ "$GIT_CHANGES" ]; then
echo -e "\n${RED}ERROR: 'node scripts/build_api_docs' caused changes to the following files:${C_RESET}\n"
echo -e "$GIT_CHANGES\n"
exit 1
fi
3 changes: 3 additions & 0 deletions vars/tasks.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ def check() {
kibanaPipeline.scriptTask('Check TypeScript Projects', 'test/scripts/checks/ts_projects.sh'),
kibanaPipeline.scriptTask('Check Jest Configs', 'test/scripts/checks/jest_configs.sh'),
kibanaPipeline.scriptTask('Check Doc API Changes', 'test/scripts/checks/doc_api_changes.sh'),
kibanaPipeline.scriptTask('Check @kbn/pm Distributable', 'test/scripts/checks/kbn_pm_dist.sh'),
kibanaPipeline.scriptTask('Check Plugin List Docs', 'test/scripts/checks/plugin_list_docs.sh'),
kibanaPipeline.scriptTask('Check Public API Docs', 'test/scripts/checks/plugin_public_api_docs.sh'),
kibanaPipeline.scriptTask('Check Types', 'test/scripts/checks/type_check.sh'),
kibanaPipeline.scriptTask('Check Bundle Limits', 'test/scripts/checks/bundle_limits.sh'),
kibanaPipeline.scriptTask('Check i18n', 'test/scripts/checks/i18n.sh'),
Expand Down

0 comments on commit bf8417e

Please sign in to comment.