diff --git a/.ci/Jenkinsfile_baseline_capture b/.ci/Jenkinsfile_baseline_capture index 672f5127a97964..7fefbbb26fd121 100644 --- a/.ci/Jenkinsfile_baseline_capture +++ b/.ci/Jenkinsfile_baseline_capture @@ -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() } diff --git a/src/dev/ci_setup/bootstrap_validations.sh b/src/dev/ci_setup/bootstrap_validations.sh deleted file mode 100644 index 939269952dea11..00000000000000 --- a/src/dev/ci_setup/bootstrap_validations.sh +++ /dev/null @@ -1,64 +0,0 @@ -#!/usr/bin/env bash - -set -e - -### -### verify no git modifications caused by bootstrap -### -if [[ $DISABLE_BOOTSTRAP_VALIDATIONS != "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 - - -### -### 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 - -### -### 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 - -### -### 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 diff --git a/src/dev/ci_setup/setup.sh b/src/dev/ci_setup/setup.sh index 3c08b336f16286..dde1cb212c536c 100755 --- a/src/dev/ci_setup/setup.sh +++ b/src/dev/ci_setup/setup.sh @@ -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 diff --git a/test/scripts/checks/kbn_pm_dist.sh b/test/scripts/checks/kbn_pm_dist.sh new file mode 100644 index 00000000000000..3116404280cca5 --- /dev/null +++ b/test/scripts/checks/kbn_pm_dist.sh @@ -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 diff --git a/test/scripts/checks/plugin_list_docs.sh b/test/scripts/checks/plugin_list_docs.sh new file mode 100644 index 00000000000000..b0f49d78458410 --- /dev/null +++ b/test/scripts/checks/plugin_list_docs.sh @@ -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 diff --git a/test/scripts/checks/plugin_public_api_docs.sh b/test/scripts/checks/plugin_public_api_docs.sh new file mode 100644 index 00000000000000..ffa6afbc9d177a --- /dev/null +++ b/test/scripts/checks/plugin_public_api_docs.sh @@ -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 diff --git a/vars/tasks.groovy b/vars/tasks.groovy index a61035403dabd4..7ed6de8094067b 100644 --- a/vars/tasks.groovy +++ b/vars/tasks.groovy @@ -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'),