From be51f0a5748b98d58ed60088b96de36df9440ac0 Mon Sep 17 00:00:00 2001 From: Brian Seeders Date: Thu, 16 Sep 2021 11:28:07 -0400 Subject: [PATCH] [Buildkite] Hourly CI / tracked branch pipeline (#111785) --- .buildkite/hooks/post-command | 3 + .buildkite/pipelines/es_snapshots/verify.yml | 8 +- .buildkite/pipelines/hourly.yml | 169 ++++++++++++++++++ .buildkite/scripts/bootstrap.sh | 2 +- .buildkite/scripts/build_kibana_plugins.sh | 10 -- .buildkite/scripts/common/env.sh | 13 +- .buildkite/scripts/common/setup_bazel.sh | 4 +- .buildkite/scripts/common/util.sh | 25 +++ .buildkite/scripts/lifecycle/post_command.sh | 27 +++ .buildkite/scripts/lifecycle/pre_build.sh | 6 +- .buildkite/scripts/lifecycle/pre_command.sh | 30 +++- .../scripts/lifecycle/print_agent_links.js | 21 +++ .../scripts/post_build_kibana_plugins.sh | 13 ++ .buildkite/scripts/steps/build_kibana.sh | 1 + .buildkite/scripts/steps/checks.sh | 22 +++ .../checks/baseline_plugin_public_api_docs.sh | 8 + .../scripts/steps/checks/bundle_limits.sh | 10 ++ .../scripts/steps/checks/commit/commit.sh | 14 ++ .../checks/commit/commit_check_runner.sh | 13 ++ .../scripts/steps/checks/doc_api_changes.sh | 9 + .../scripts/steps/checks/file_casing.sh | 9 + .buildkite/scripts/steps/checks/i18n.sh | 9 + .../scripts/steps/checks/jest_configs.sh | 9 + .../scripts/steps/checks/kbn_pm_dist.sh | 10 ++ .buildkite/scripts/steps/checks/licenses.sh | 9 + .../scripts/steps/checks/plugin_list_docs.sh | 10 ++ .../checks/plugins_with_circular_deps.sh | 9 + .buildkite/scripts/steps/checks/telemetry.sh | 9 + .../scripts/steps/checks/test_hardening.sh | 9 + .../scripts/steps/checks/test_projects.sh | 9 + .../scripts/steps/checks/ts_projects.sh | 9 + .../type_check_plugin_public_api_docs.sh | 19 ++ .../scripts/steps/checks/verify_notice.sh | 9 + .buildkite/scripts/steps/demo_env/kibana.sh | 3 - .buildkite/scripts/steps/functional/common.sh | 10 ++ .../steps/functional/oss_accessibility.sh | 13 ++ .../scripts/steps/functional/oss_cigroup.sh | 12 +- .../scripts/steps/functional/oss_firefox.sh | 14 ++ .../scripts/steps/functional/oss_misc.sh | 46 +++++ .../steps/functional/xpack_accessibility.sh | 15 ++ .../scripts/steps/functional/xpack_cigroup.sh | 14 +- .../scripts/steps/functional/xpack_firefox.sh | 17 ++ .../xpack_saved_object_field_metrics.sh | 17 ++ .buildkite/scripts/steps/lint.sh | 15 ++ .../steps/on_merge_build_and_metrics.sh | 3 - .../steps/storybooks/build_and_upload.js | 106 +++++++++++ .../steps/storybooks/build_and_upload.sh | 7 + .../scripts/steps/test/api_integration.sh | 15 +- .buildkite/scripts/steps/test/jest.sh | 7 +- .../scripts/steps/test/jest_integration.sh | 7 +- .ci/ci_groups.yml | 1 - .../src/failed_tests_reporter/es_config | 138 ++++++++++++++ .../get_failures.test.ts | 21 +++ .../src/failed_tests_reporter/get_failures.ts | 18 +- .../report_failure.test.ts | 4 +- .../failed_tests_reporter/report_failure.ts | 4 +- .../report_failures_to_es.ts | 66 +++++++ .../run_failed_tests_reporter_cli.ts | 29 ++- packages/kbn-test/src/report_path.ts | 2 +- test/functional/apps/bundles/index.js | 2 +- test/functional/apps/visualize/index.ts | 4 +- vars/kibanaCoverage.groovy | 1 - vars/kibanaPipeline.groovy | 2 +- vars/tasks.groovy | 2 +- 64 files changed, 1075 insertions(+), 77 deletions(-) create mode 100755 .buildkite/hooks/post-command create mode 100644 .buildkite/pipelines/hourly.yml create mode 100755 .buildkite/scripts/lifecycle/post_command.sh create mode 100644 .buildkite/scripts/lifecycle/print_agent_links.js create mode 100755 .buildkite/scripts/post_build_kibana_plugins.sh create mode 100755 .buildkite/scripts/steps/checks.sh create mode 100755 .buildkite/scripts/steps/checks/baseline_plugin_public_api_docs.sh create mode 100755 .buildkite/scripts/steps/checks/bundle_limits.sh create mode 100755 .buildkite/scripts/steps/checks/commit/commit.sh create mode 100755 .buildkite/scripts/steps/checks/commit/commit_check_runner.sh create mode 100755 .buildkite/scripts/steps/checks/doc_api_changes.sh create mode 100755 .buildkite/scripts/steps/checks/file_casing.sh create mode 100755 .buildkite/scripts/steps/checks/i18n.sh create mode 100755 .buildkite/scripts/steps/checks/jest_configs.sh create mode 100755 .buildkite/scripts/steps/checks/kbn_pm_dist.sh create mode 100755 .buildkite/scripts/steps/checks/licenses.sh create mode 100755 .buildkite/scripts/steps/checks/plugin_list_docs.sh create mode 100755 .buildkite/scripts/steps/checks/plugins_with_circular_deps.sh create mode 100755 .buildkite/scripts/steps/checks/telemetry.sh create mode 100755 .buildkite/scripts/steps/checks/test_hardening.sh create mode 100755 .buildkite/scripts/steps/checks/test_projects.sh create mode 100755 .buildkite/scripts/steps/checks/ts_projects.sh create mode 100755 .buildkite/scripts/steps/checks/type_check_plugin_public_api_docs.sh create mode 100755 .buildkite/scripts/steps/checks/verify_notice.sh create mode 100755 .buildkite/scripts/steps/functional/common.sh create mode 100755 .buildkite/scripts/steps/functional/oss_accessibility.sh create mode 100755 .buildkite/scripts/steps/functional/oss_firefox.sh create mode 100755 .buildkite/scripts/steps/functional/oss_misc.sh create mode 100755 .buildkite/scripts/steps/functional/xpack_accessibility.sh create mode 100755 .buildkite/scripts/steps/functional/xpack_firefox.sh create mode 100755 .buildkite/scripts/steps/functional/xpack_saved_object_field_metrics.sh create mode 100755 .buildkite/scripts/steps/lint.sh create mode 100644 .buildkite/scripts/steps/storybooks/build_and_upload.js create mode 100755 .buildkite/scripts/steps/storybooks/build_and_upload.sh create mode 100644 packages/kbn-test/src/failed_tests_reporter/es_config create mode 100644 packages/kbn-test/src/failed_tests_reporter/report_failures_to_es.ts diff --git a/.buildkite/hooks/post-command b/.buildkite/hooks/post-command new file mode 100755 index 0000000000000..d9a8ad668da0b --- /dev/null +++ b/.buildkite/hooks/post-command @@ -0,0 +1,3 @@ +#!/usr/bin/env bash + +.buildkite/scripts/lifecycle/post_command.sh diff --git a/.buildkite/pipelines/es_snapshots/verify.yml b/.buildkite/pipelines/es_snapshots/verify.yml index f67de4819c23a..aa49ba5d2641f 100755 --- a/.buildkite/pipelines/es_snapshots/verify.yml +++ b/.buildkite/pipelines/es_snapshots/verify.yml @@ -28,7 +28,6 @@ steps: parallelism: 13 agents: queue: ci-group-6 - artifact_paths: target/junit/**/*.xml depends_on: build key: default-cigroup retry: @@ -40,7 +39,6 @@ steps: label: 'Docker CI Group' agents: queue: ci-group-6 - artifact_paths: target/junit/**/*.xml depends_on: build key: default-cigroup-docker retry: @@ -50,10 +48,9 @@ steps: - command: .buildkite/scripts/steps/functional/oss_cigroup.sh label: 'OSS CI Group' - parallelism: 12 + parallelism: 11 agents: queue: ci-group-4d - artifact_paths: target/junit/**/*.xml depends_on: build key: oss-cigroup retry: @@ -65,7 +62,6 @@ steps: label: 'Jest Integration Tests' agents: queue: jest - artifact_paths: target/junit/**/*.xml key: jest-integration retry: automatic: @@ -76,7 +72,6 @@ steps: label: 'API Integration Tests' agents: queue: jest - artifact_paths: target/junit/**/*.xml key: api-integration - command: .buildkite/scripts/steps/es_snapshots/trigger_promote.sh @@ -94,6 +89,7 @@ steps: - plugins: - junit-annotate#v1.9.0: artifacts: target/junit/**/*.xml + job-uuid-file-pattern: '-bk__(.*).xml' - wait: ~ continue_on_failure: true diff --git a/.buildkite/pipelines/hourly.yml b/.buildkite/pipelines/hourly.yml new file mode 100644 index 0000000000000..0dc8ad3e08d08 --- /dev/null +++ b/.buildkite/pipelines/hourly.yml @@ -0,0 +1,169 @@ +steps: + - command: .buildkite/scripts/lifecycle/pre_build.sh + label: Pre-Build + + - wait + + - command: .buildkite/scripts/steps/build_kibana.sh + label: Build Kibana Distribution and Plugins + agents: + queue: c2-8 + key: build + if: "build.env('KIBANA_BUILD_ID') == null || build.env('KIBANA_BUILD_ID') == ''" + + - command: .buildkite/scripts/steps/functional/xpack_cigroup.sh + label: 'Default CI Group' + parallelism: 13 + agents: + queue: ci-group-6 + depends_on: build + timeout_in_minutes: 120 + key: default-cigroup + retry: + automatic: + - exit_status: '*' + limit: 1 + + - command: CI_GROUP=Docker .buildkite/scripts/steps/functional/xpack_cigroup.sh + label: 'Docker CI Group' + agents: + queue: ci-group-6 + depends_on: build + timeout_in_minutes: 120 + key: default-cigroup-docker + retry: + automatic: + - exit_status: '*' + limit: 1 + + - command: .buildkite/scripts/steps/functional/oss_cigroup.sh + label: 'OSS CI Group' + parallelism: 11 + agents: + queue: ci-group-4d + depends_on: build + timeout_in_minutes: 120 + key: oss-cigroup + retry: + automatic: + - exit_status: '*' + limit: 1 + + - command: .buildkite/scripts/steps/functional/oss_accessibility.sh + label: 'OSS Accessibility Tests' + agents: + queue: ci-group-4d + depends_on: build + timeout_in_minutes: 120 + retry: + automatic: + - exit_status: '*' + limit: 1 + + - command: .buildkite/scripts/steps/functional/xpack_accessibility.sh + label: 'Default Accessibility Tests' + agents: + queue: ci-group-6 + depends_on: build + timeout_in_minutes: 120 + retry: + automatic: + - exit_status: '*' + limit: 1 + + - command: .buildkite/scripts/steps/functional/oss_firefox.sh + label: 'OSS Firefox Tests' + agents: + queue: ci-group-4d + depends_on: build + timeout_in_minutes: 120 + retry: + automatic: + - exit_status: '*' + limit: 1 + + - command: .buildkite/scripts/steps/functional/xpack_firefox.sh + label: 'Default Firefox Tests' + agents: + queue: ci-group-6 + depends_on: build + timeout_in_minutes: 120 + retry: + automatic: + - exit_status: '*' + limit: 1 + + - command: .buildkite/scripts/steps/functional/oss_misc.sh + label: 'OSS Misc Functional Tests' + agents: + queue: ci-group-4d + depends_on: build + timeout_in_minutes: 120 + retry: + automatic: + - exit_status: '*' + limit: 1 + + - command: .buildkite/scripts/steps/functional/xpack_saved_object_field_metrics.sh + label: 'Saved Object Field Metrics' + agents: + queue: ci-group-6 + depends_on: build + timeout_in_minutes: 120 + retry: + automatic: + - exit_status: '*' + limit: 1 + + - command: .buildkite/scripts/steps/test/jest_integration.sh + label: 'Jest Integration Tests' + agents: + queue: jest + timeout_in_minutes: 120 + key: jest-integration + + - command: .buildkite/scripts/steps/test/api_integration.sh + label: 'API Integration Tests' + agents: + queue: jest + timeout_in_minutes: 120 + key: api-integration + + - command: .buildkite/scripts/steps/test/jest.sh + label: 'Jest Tests' + agents: + queue: c2-16 + timeout_in_minutes: 120 + key: jest + + - command: .buildkite/scripts/steps/lint.sh + label: 'Linting' + agents: + queue: n2-2 + key: linting + + - command: .buildkite/scripts/steps/checks.sh + label: 'Checks' + agents: + queue: c2-4 + key: checks + + - command: .buildkite/scripts/steps/storybooks/build_and_upload.sh + label: 'Build Storybooks' + agents: + queue: c2-4 + key: storybooks + + - wait: ~ + continue_on_failure: true + + - plugins: + - junit-annotate#v1.9.0: + artifacts: target/junit/**/*.xml + job-uuid-file-pattern: '-bk__(.*).xml' + + - wait: ~ + continue_on_failure: true + + - command: .buildkite/scripts/lifecycle/post_build.sh + label: Post-Build diff --git a/.buildkite/scripts/bootstrap.sh b/.buildkite/scripts/bootstrap.sh index 05a250f8e9e8c..3c6283a4fe3fd 100755 --- a/.buildkite/scripts/bootstrap.sh +++ b/.buildkite/scripts/bootstrap.sh @@ -5,7 +5,7 @@ set -euo pipefail source .buildkite/scripts/common/util.sh echo "--- yarn install and bootstrap" -yarn kbn bootstrap +retry 2 15 yarn kbn bootstrap ### ### upload ts-refs-cache artifacts as quickly as possible so they are available for download diff --git a/.buildkite/scripts/build_kibana_plugins.sh b/.buildkite/scripts/build_kibana_plugins.sh index 14ea71a75bae6..4891ef563dc04 100755 --- a/.buildkite/scripts/build_kibana_plugins.sh +++ b/.buildkite/scripts/build_kibana_plugins.sh @@ -19,13 +19,3 @@ node scripts/build_kibana_platform_plugins \ --scan-dir "$XPACK_DIR/test/usage_collection/plugins" \ --scan-dir "$XPACK_DIR/test/security_functional/fixtures/common" \ --scan-dir "$XPACK_DIR/examples" - -echo "--- Archive built plugins" -shopt -s globstar -tar -zcf \ - target/kibana-default-plugins.tar.gz \ - x-pack/plugins/**/target/public \ - x-pack/test/**/target/public \ - examples/**/target/public \ - x-pack/examples/**/target/public \ - test/**/target/public diff --git a/.buildkite/scripts/common/env.sh b/.buildkite/scripts/common/env.sh index b1701603ec084..282af74bbe18f 100755 --- a/.buildkite/scripts/common/env.sh +++ b/.buildkite/scripts/common/env.sh @@ -11,6 +11,13 @@ PARENT_DIR="$(cd "$KIBANA_DIR/.."; pwd)" export PARENT_DIR export WORKSPACE="${WORKSPACE:-$PARENT_DIR}" +# A few things, such as Chrome, respect this variable +# For many agent types, the workspace is mounted on a local ssd, so will be faster than the default tmp dir location +if [[ -d /opt/local-ssd/buildkite ]]; then + export TMPDIR="/opt/local-ssd/buildkite/tmp" + mkdir -p "$TMPDIR" +fi + KIBANA_PKG_BRANCH="$(jq -r .branch "$KIBANA_DIR/package.json")" export KIBANA_PKG_BRANCH export KIBANA_BASE_BRANCH="$KIBANA_PKG_BRANCH" @@ -28,11 +35,9 @@ export TEST_BROWSER_HEADLESS=1 export ELASTIC_APM_ENVIRONMENT=ci export ELASTIC_APM_TRANSACTION_SAMPLE_RATE=0.1 -CI_REPORTING_ENABLED=false # TODO enable when ready, only controls checks reporter and APM - if is_pr; then export ELASTIC_APM_ACTIVE=false - export CHECKS_REPORTER_ACTIVE="${CI_REPORTING_ENABLED-}" + export CHECKS_REPORTER_ACTIVE=true # These can be removed once we're not supporting Jenkins and Buildkite at the same time # These are primarily used by github checks reporter and can be configured via /github_checks_api.json @@ -42,7 +47,7 @@ if is_pr; then # set_git_merge_base # TODO for PRs else - export ELASTIC_APM_ACTIVE="${CI_REPORTING_ENABLED-}" + export ELASTIC_APM_ACTIVE=true export CHECKS_REPORTER_ACTIVE=false fi diff --git a/.buildkite/scripts/common/setup_bazel.sh b/.buildkite/scripts/common/setup_bazel.sh index 16ea9a3900353..bbd1c58497172 100644 --- a/.buildkite/scripts/common/setup_bazel.sh +++ b/.buildkite/scripts/common/setup_bazel.sh @@ -1,6 +1,8 @@ #!/usr/bin/env bash -KIBANA_BUILDBUDDY_CI_API_KEY=$(vault read -field=value secret/kibana-issues/dev/kibana-buildbuddy-ci-api-key) +source .buildkite/scripts/common/util.sh + +KIBANA_BUILDBUDDY_CI_API_KEY=$(retry 5 5 vault read -field=value secret/kibana-issues/dev/kibana-buildbuddy-ci-api-key) export KIBANA_BUILDBUDDY_CI_API_KEY cp "$KIBANA_DIR/src/dev/ci_setup/.bazelrc-ci" "$HOME/.bazelrc" diff --git a/.buildkite/scripts/common/util.sh b/.buildkite/scripts/common/util.sh index 653b0c4e9cdbb..d536f1a37acfd 100755 --- a/.buildkite/scripts/common/util.sh +++ b/.buildkite/scripts/common/util.sh @@ -49,3 +49,28 @@ docker_run() { docker run "${args[@]}" "$@" } + +is_test_execution_step() { + buildkite-agent meta-data set "${BUILDKITE_JOB_ID}_is_test_execution_step" 'true' +} + +retry() { + local retries=$1; shift + local delay=$1; shift + local attempts=1 + + until "$@"; do + retry_exit_status=$? + echo "Exited with $retry_exit_status" >&2 + if (( retries == "0" )); then + return $retry_exit_status + elif (( attempts == retries )); then + echo "Failed $attempts retries" >&2 + return $retry_exit_status + else + echo "Retrying $((retries - attempts)) more times..." >&2 + attempts=$((attempts + 1)) + sleep "$delay" + fi + done +} diff --git a/.buildkite/scripts/lifecycle/post_command.sh b/.buildkite/scripts/lifecycle/post_command.sh new file mode 100755 index 0000000000000..14391fdd1e698 --- /dev/null +++ b/.buildkite/scripts/lifecycle/post_command.sh @@ -0,0 +1,27 @@ +#!/usr/bin/env bash + +set -euo pipefail + +IS_TEST_EXECUTION_STEP="$(buildkite-agent meta-data get "${BUILDKITE_JOB_ID}_is_test_execution_step" --default '')" + +if [[ "$IS_TEST_EXECUTION_STEP" == "true" ]]; then + buildkite-agent artifact upload 'target/junit/**/*' + buildkite-agent artifact upload 'target/kibana-*' + buildkite-agent artifact upload 'target/kibana-coverage/jest/**/*' + buildkite-agent artifact upload 'target/kibana-security-solution/**/*.png' + buildkite-agent artifact upload 'target/test-metrics/*' + buildkite-agent artifact upload 'target/test-suites-ci-plan.json' + buildkite-agent artifact upload 'test/**/screenshots/diff/*.png' + buildkite-agent artifact upload 'test/**/screenshots/failure/*.png' + buildkite-agent artifact upload 'test/**/screenshots/session/*.png' + buildkite-agent artifact upload 'test/functional/failure_debug/html/*.html' + buildkite-agent artifact upload 'x-pack/test/**/screenshots/diff/*.png' + buildkite-agent artifact upload 'x-pack/test/**/screenshots/failure/*.png' + buildkite-agent artifact upload 'x-pack/test/**/screenshots/session/*.png' + buildkite-agent artifact upload 'x-pack/test/functional/apps/reporting/reports/session/*.pdf' + buildkite-agent artifact upload 'x-pack/test/functional/failure_debug/html/*.html' + buildkite-agent artifact upload '.es/**/*.hprof' + + # TODO - re-enable when Jenkins is disabled + # node scripts/report_failed_tests --build-url="${BUILDKITE_BUILD_URL}#${BUILDKITE_JOB_ID}" 'target/junit/**/*.xml' +fi diff --git a/.buildkite/scripts/lifecycle/pre_build.sh b/.buildkite/scripts/lifecycle/pre_build.sh index 2ddf9a73d0622..d91597a00a080 100755 --- a/.buildkite/scripts/lifecycle/pre_build.sh +++ b/.buildkite/scripts/lifecycle/pre_build.sh @@ -2,9 +2,11 @@ set -euo pipefail +source .buildkite/scripts/common/util.sh + "$(dirname "${0}")/commit_status_start.sh" -export CI_STATS_TOKEN="$(vault read -field=api_token secret/kibana-issues/dev/kibana_ci_stats)" -export CI_STATS_HOST="$(vault read -field=api_host secret/kibana-issues/dev/kibana_ci_stats)" +export CI_STATS_TOKEN="$(retry 5 5 vault read -field=api_token secret/kibana-issues/dev/kibana_ci_stats)" +export CI_STATS_HOST="$(retry 5 5 vault read -field=api_host secret/kibana-issues/dev/kibana_ci_stats)" node "$(dirname "${0}")/ci_stats_start.js" diff --git a/.buildkite/scripts/lifecycle/pre_command.sh b/.buildkite/scripts/lifecycle/pre_command.sh index 759f1e7b4ff9e..d391bea1340a0 100755 --- a/.buildkite/scripts/lifecycle/pre_command.sh +++ b/.buildkite/scripts/lifecycle/pre_command.sh @@ -2,11 +2,17 @@ set -euo pipefail +source .buildkite/scripts/common/util.sh + +node .buildkite/scripts/lifecycle/print_agent_links.js + +echo '--- Job Environment Setup' + cd '.buildkite' yarn install cd - -BUILDKITE_TOKEN="$(vault read -field=buildkite_token_all_jobs secret/kibana-issues/dev/buildkite-ci)" +BUILDKITE_TOKEN="$(retry 5 5 vault read -field=buildkite_token_all_jobs secret/kibana-issues/dev/buildkite-ci)" export BUILDKITE_TOKEN # Set up a custom ES Snapshot Manifest if one has been specified for this build @@ -43,10 +49,10 @@ EOF if [[ "$CI_STATS_BUILD_ID" ]]; then echo "CI Stats Build ID: $CI_STATS_BUILD_ID" - CI_STATS_TOKEN="$(vault read -field=api_token secret/kibana-issues/dev/kibana_ci_stats)" + CI_STATS_TOKEN="$(retry 5 5 vault read -field=api_token secret/kibana-issues/dev/kibana_ci_stats)" export CI_STATS_TOKEN - CI_STATS_HOST="$(vault read -field=api_host secret/kibana-issues/dev/kibana_ci_stats)" + CI_STATS_HOST="$(retry 5 5 vault read -field=api_host secret/kibana-issues/dev/kibana_ci_stats)" export CI_STATS_HOST KIBANA_CI_STATS_CONFIG=$(jq -n \ @@ -59,14 +65,28 @@ EOF fi } -GITHUB_TOKEN=$(vault read -field=github_token secret/kibana-issues/dev/kibanamachine) +GITHUB_TOKEN=$(retry 5 5 vault read -field=github_token secret/kibana-issues/dev/kibanamachine) export GITHUB_TOKEN +KIBANA_CI_REPORTER_KEY=$(retry 5 5 vault read -field=value secret/kibana-issues/dev/kibanamachine-reporter) +export KIBANA_CI_REPORTER_KEY + +# Setup Failed Test Reporter Elasticsearch credentials +{ + TEST_FAILURES_ES_CLOUD_ID=$(retry 5 5 vault read -field=cloud_id secret/kibana-issues/dev/failed_tests_reporter_es) + export TEST_FAILURES_ES_CLOUD_ID + + TEST_FAILURES_ES_USERNAME=$(retry 5 5 vault read -field=username secret/kibana-issues/dev/failed_tests_reporter_es) + export TEST_FAILURES_ES_USERNAME + + TEST_FAILURES_ES_PASSWORD=$(retry 5 5 vault read -field=password secret/kibana-issues/dev/failed_tests_reporter_es) + export TEST_FAILURES_ES_PASSWORD +} + # By default, all steps should set up these things to get a full environment before running # It can be skipped for pipeline upload steps though, to make job start time a little faster if [[ "${SKIP_CI_SETUP:-}" != "true" ]]; then if [[ -d .buildkite/scripts && "${BUILDKITE_COMMAND:-}" != "buildkite-agent pipeline upload"* ]]; then - source .buildkite/scripts/common/util.sh source .buildkite/scripts/common/env.sh source .buildkite/scripts/common/setup_node.sh source .buildkite/scripts/common/setup_bazel.sh diff --git a/.buildkite/scripts/lifecycle/print_agent_links.js b/.buildkite/scripts/lifecycle/print_agent_links.js new file mode 100644 index 0000000000000..e212b17e4ad6a --- /dev/null +++ b/.buildkite/scripts/lifecycle/print_agent_links.js @@ -0,0 +1,21 @@ +const NOW = new Date(); +const TWO_HOURS = new Date(NOW.getTime() + 2 * 60 * 60 * 1000); + +const METRICS_URL = [ + `https://kibana-ops-buildkite-monitoring.kb.us-central1.gcp.cloud.es.io:9243`, + `/app/metrics/link-to/host-detail/${process.env.BUILDKITE_AGENT_NAME}`, + `?to=${TWO_HOURS.getTime()}`, + `&from=${NOW.getTime()}`, +].join(''); + +const LOGS_URL = [ + `https://kibana-ops-buildkite-monitoring.kb.us-central1.gcp.cloud.es.io:9243`, + `/app/logs/link-to/host-logs/${process.env.BUILDKITE_AGENT_NAME}`, + `?time=${NOW.getTime()}`, +].join(''); + +console.log('--- Agent Debug Links'); +console.log('Agent Metrics:'); +console.log('\u001b]1339;' + `url='${METRICS_URL}'\u0007`); +console.log('Agent Logs:'); +console.log('\u001b]1339;' + `url='${LOGS_URL}'\u0007`); diff --git a/.buildkite/scripts/post_build_kibana_plugins.sh b/.buildkite/scripts/post_build_kibana_plugins.sh new file mode 100755 index 0000000000000..288fd262cafa9 --- /dev/null +++ b/.buildkite/scripts/post_build_kibana_plugins.sh @@ -0,0 +1,13 @@ +#!/usr/bin/env bash + +set -euo pipefail + +echo "--- Archive built plugins" +shopt -s globstar +tar -zcf \ + target/kibana-default-plugins.tar.gz \ + x-pack/plugins/**/target/public \ + x-pack/test/**/target/public \ + examples/**/target/public \ + x-pack/examples/**/target/public \ + test/**/target/public diff --git a/.buildkite/scripts/steps/build_kibana.sh b/.buildkite/scripts/steps/build_kibana.sh index 5896dcac5d444..bf4a9ff243d02 100755 --- a/.buildkite/scripts/steps/build_kibana.sh +++ b/.buildkite/scripts/steps/build_kibana.sh @@ -5,4 +5,5 @@ set -euo pipefail .buildkite/scripts/bootstrap.sh .buildkite/scripts/build_kibana.sh .buildkite/scripts/build_kibana_plugins.sh +.buildkite/scripts/post_build_kibana_plugins.sh .buildkite/scripts/post_build_kibana.sh diff --git a/.buildkite/scripts/steps/checks.sh b/.buildkite/scripts/steps/checks.sh new file mode 100755 index 0000000000000..0d4bc829ead79 --- /dev/null +++ b/.buildkite/scripts/steps/checks.sh @@ -0,0 +1,22 @@ +#!/usr/bin/env bash + +set -euo pipefail + +.buildkite/scripts/bootstrap.sh + +.buildkite/scripts/steps/checks/commit/commit.sh +.buildkite/scripts/steps/checks/telemetry.sh +.buildkite/scripts/steps/checks/ts_projects.sh +.buildkite/scripts/steps/checks/jest_configs.sh +.buildkite/scripts/steps/checks/doc_api_changes.sh +.buildkite/scripts/steps/checks/kbn_pm_dist.sh +.buildkite/scripts/steps/checks/plugin_list_docs.sh +.buildkite/scripts/steps/checks/type_check_plugin_public_api_docs.sh +.buildkite/scripts/steps/checks/bundle_limits.sh +.buildkite/scripts/steps/checks/i18n.sh +.buildkite/scripts/steps/checks/file_casing.sh +.buildkite/scripts/steps/checks/licenses.sh +.buildkite/scripts/steps/checks/plugins_with_circular_deps.sh +.buildkite/scripts/steps/checks/verify_notice.sh +.buildkite/scripts/steps/checks/test_projects.sh +.buildkite/scripts/steps/checks/test_hardening.sh diff --git a/.buildkite/scripts/steps/checks/baseline_plugin_public_api_docs.sh b/.buildkite/scripts/steps/checks/baseline_plugin_public_api_docs.sh new file mode 100755 index 0000000000000..5b8bc210ca725 --- /dev/null +++ b/.buildkite/scripts/steps/checks/baseline_plugin_public_api_docs.sh @@ -0,0 +1,8 @@ +#!/usr/bin/env bash + +set -euo pipefail + +source .buildkite/scripts/common/util.sh + +echo --- Building api docs +node --max-old-space-size=12000 scripts/build_api_docs diff --git a/.buildkite/scripts/steps/checks/bundle_limits.sh b/.buildkite/scripts/steps/checks/bundle_limits.sh new file mode 100755 index 0000000000000..f0885d246f2c6 --- /dev/null +++ b/.buildkite/scripts/steps/checks/bundle_limits.sh @@ -0,0 +1,10 @@ +#!/usr/bin/env bash + +set -euo pipefail + +source .buildkite/scripts/common/util.sh + +echo --- Check Bundle Limits + +checks-reporter-with-killswitch "Check Bundle Limits" \ + node scripts/build_kibana_platform_plugins --validate-limits diff --git a/.buildkite/scripts/steps/checks/commit/commit.sh b/.buildkite/scripts/steps/checks/commit/commit.sh new file mode 100755 index 0000000000000..5ff2632103a63 --- /dev/null +++ b/.buildkite/scripts/steps/checks/commit/commit.sh @@ -0,0 +1,14 @@ +#!/usr/bin/env bash + +set -euo pipefail + +source .buildkite/scripts/common/util.sh + +# Runs pre-commit hook script for the files touched in the last commit. +# That way we can ensure a set of quick commit checks earlier as we removed +# the pre-commit hook installation by default. +# If files are more than 200 we will skip it and just use +# the further ci steps that already check linting and file casing for the entire repo. +echo --- Quick commit checks +checks-reporter-with-killswitch "Quick commit checks" \ + "$(dirname "${0}")/commit_check_runner.sh" diff --git a/.buildkite/scripts/steps/checks/commit/commit_check_runner.sh b/.buildkite/scripts/steps/checks/commit/commit_check_runner.sh new file mode 100755 index 0000000000000..8d35c3698f3e1 --- /dev/null +++ b/.buildkite/scripts/steps/checks/commit/commit_check_runner.sh @@ -0,0 +1,13 @@ +#!/usr/bin/env bash + +run_quick_commit_checks() { + echo "!!!!!!!! ATTENTION !!!!!!!! +That check is intended to provide earlier CI feedback after we remove the automatic install for the local pre-commit hook. +If you want, you can still manually install the pre-commit hook locally by running 'node scripts/register_git_hook locally' +!!!!!!!!!!!!!!!!!!!!!!!!!!! +" + + node scripts/precommit_hook.js --ref HEAD~1..HEAD --max-files 200 --verbose +} + +run_quick_commit_checks diff --git a/.buildkite/scripts/steps/checks/doc_api_changes.sh b/.buildkite/scripts/steps/checks/doc_api_changes.sh new file mode 100755 index 0000000000000..73a2bb9409d02 --- /dev/null +++ b/.buildkite/scripts/steps/checks/doc_api_changes.sh @@ -0,0 +1,9 @@ +#!/usr/bin/env bash + +set -euo pipefail + +source .buildkite/scripts/common/util.sh + +echo --- Check Doc API Changes +checks-reporter-with-killswitch "Check Doc API Changes" \ + node scripts/check_published_api_changes diff --git a/.buildkite/scripts/steps/checks/file_casing.sh b/.buildkite/scripts/steps/checks/file_casing.sh new file mode 100755 index 0000000000000..76e3dce506487 --- /dev/null +++ b/.buildkite/scripts/steps/checks/file_casing.sh @@ -0,0 +1,9 @@ +#!/usr/bin/env bash + +set -euo pipefail + +source .buildkite/scripts/common/util.sh + +echo --- Check File Casing +checks-reporter-with-killswitch "Check File Casing" \ + node scripts/check_file_casing --quiet diff --git a/.buildkite/scripts/steps/checks/i18n.sh b/.buildkite/scripts/steps/checks/i18n.sh new file mode 100755 index 0000000000000..fad455899215d --- /dev/null +++ b/.buildkite/scripts/steps/checks/i18n.sh @@ -0,0 +1,9 @@ +#!/usr/bin/env bash + +set -euo pipefail + +source .buildkite/scripts/common/util.sh + +echo --- Check i18n +checks-reporter-with-killswitch "Check i18n" \ + node scripts/i18n_check --ignore-missing diff --git a/.buildkite/scripts/steps/checks/jest_configs.sh b/.buildkite/scripts/steps/checks/jest_configs.sh new file mode 100755 index 0000000000000..b85687333c92b --- /dev/null +++ b/.buildkite/scripts/steps/checks/jest_configs.sh @@ -0,0 +1,9 @@ +#!/usr/bin/env bash + +set -euo pipefail + +source .buildkite/scripts/common/util.sh + +echo --- Check Jest Configs +checks-reporter-with-killswitch "Check Jest Configs" \ + node scripts/check_jest_configs diff --git a/.buildkite/scripts/steps/checks/kbn_pm_dist.sh b/.buildkite/scripts/steps/checks/kbn_pm_dist.sh new file mode 100755 index 0000000000000..61281bc136311 --- /dev/null +++ b/.buildkite/scripts/steps/checks/kbn_pm_dist.sh @@ -0,0 +1,10 @@ +#!/usr/bin/env bash + +set -euo pipefail + +source .buildkite/scripts/common/util.sh + +echo "--- Building kbn-pm distributable" +yarn kbn run build -i @kbn/pm + +verify_no_git_changes 'yarn kbn run build -i @kbn/pm' diff --git a/.buildkite/scripts/steps/checks/licenses.sh b/.buildkite/scripts/steps/checks/licenses.sh new file mode 100755 index 0000000000000..58add8a8c9530 --- /dev/null +++ b/.buildkite/scripts/steps/checks/licenses.sh @@ -0,0 +1,9 @@ +#!/usr/bin/env bash + +set -euo pipefail + +source .buildkite/scripts/common/util.sh + +echo --- Check Licenses +checks-reporter-with-killswitch "Check Licenses" \ + node scripts/check_licenses --dev diff --git a/.buildkite/scripts/steps/checks/plugin_list_docs.sh b/.buildkite/scripts/steps/checks/plugin_list_docs.sh new file mode 100755 index 0000000000000..b422e478aaf7d --- /dev/null +++ b/.buildkite/scripts/steps/checks/plugin_list_docs.sh @@ -0,0 +1,10 @@ +#!/usr/bin/env bash + +set -euo pipefail + +source .buildkite/scripts/common/util.sh + +echo "--- Building plugin list docs" +node scripts/build_plugin_list_docs + +verify_no_git_changes 'node scripts/build_plugin_list_docs' diff --git a/.buildkite/scripts/steps/checks/plugins_with_circular_deps.sh b/.buildkite/scripts/steps/checks/plugins_with_circular_deps.sh new file mode 100755 index 0000000000000..783b709c18aa4 --- /dev/null +++ b/.buildkite/scripts/steps/checks/plugins_with_circular_deps.sh @@ -0,0 +1,9 @@ +#!/usr/bin/env bash + +set -euo pipefail + +source .buildkite/scripts/common/util.sh + +echo --- Check Plugins With Circular Dependencies +checks-reporter-with-killswitch "Check Plugins With Circular Dependencies" \ + node scripts/find_plugins_with_circular_deps diff --git a/.buildkite/scripts/steps/checks/telemetry.sh b/.buildkite/scripts/steps/checks/telemetry.sh new file mode 100755 index 0000000000000..e058d5ceab857 --- /dev/null +++ b/.buildkite/scripts/steps/checks/telemetry.sh @@ -0,0 +1,9 @@ +#!/usr/bin/env bash + +set -euo pipefail + +source .buildkite/scripts/common/util.sh + +echo --- Check Telemetry Schema +checks-reporter-with-killswitch "Check Telemetry Schema" \ + node scripts/telemetry_check diff --git a/.buildkite/scripts/steps/checks/test_hardening.sh b/.buildkite/scripts/steps/checks/test_hardening.sh new file mode 100755 index 0000000000000..c80dd1b0b6fd7 --- /dev/null +++ b/.buildkite/scripts/steps/checks/test_hardening.sh @@ -0,0 +1,9 @@ +#!/usr/bin/env bash + +set -euo pipefail + +source .buildkite/scripts/common/util.sh + +echo --- Test Hardening +checks-reporter-with-killswitch "Test Hardening" \ + node scripts/test_hardening diff --git a/.buildkite/scripts/steps/checks/test_projects.sh b/.buildkite/scripts/steps/checks/test_projects.sh new file mode 100755 index 0000000000000..4c7d9094cb0c3 --- /dev/null +++ b/.buildkite/scripts/steps/checks/test_projects.sh @@ -0,0 +1,9 @@ +#!/usr/bin/env bash + +set -euo pipefail + +source .buildkite/scripts/common/util.sh + +echo --- Test Projects +checks-reporter-with-killswitch "Test Projects" \ + yarn kbn run test --exclude kibana --oss --skip-kibana-plugins --skip-missing diff --git a/.buildkite/scripts/steps/checks/ts_projects.sh b/.buildkite/scripts/steps/checks/ts_projects.sh new file mode 100755 index 0000000000000..53b4f536e8f4b --- /dev/null +++ b/.buildkite/scripts/steps/checks/ts_projects.sh @@ -0,0 +1,9 @@ +#!/usr/bin/env bash + +set -euo pipefail + +source .buildkite/scripts/common/util.sh + +echo --- Check TypeScript Projects +checks-reporter-with-killswitch "Check TypeScript Projects" \ + node scripts/check_ts_projects diff --git a/.buildkite/scripts/steps/checks/type_check_plugin_public_api_docs.sh b/.buildkite/scripts/steps/checks/type_check_plugin_public_api_docs.sh new file mode 100755 index 0000000000000..1d73d1748ddf7 --- /dev/null +++ b/.buildkite/scripts/steps/checks/type_check_plugin_public_api_docs.sh @@ -0,0 +1,19 @@ +#!/usr/bin/env bash + +set -euo pipefail + +source .buildkite/scripts/common/util.sh + +echo --- Build TS Refs +checks-reporter-with-killswitch "Build TS Refs" \ + node scripts/build_ts_refs \ + --clean \ + --no-cache \ + --force + +echo --- Check Types +checks-reporter-with-killswitch "Check Types" \ + node scripts/type_check + +echo --- Building api docs +node --max-old-space-size=12000 scripts/build_api_docs diff --git a/.buildkite/scripts/steps/checks/verify_notice.sh b/.buildkite/scripts/steps/checks/verify_notice.sh new file mode 100755 index 0000000000000..a92a268bdc886 --- /dev/null +++ b/.buildkite/scripts/steps/checks/verify_notice.sh @@ -0,0 +1,9 @@ +#!/usr/bin/env bash + +set -euo pipefail + +source .buildkite/scripts/common/util.sh + +echo --- Verify NOTICE +checks-reporter-with-killswitch "Verify NOTICE" \ + node scripts/notice --validate diff --git a/.buildkite/scripts/steps/demo_env/kibana.sh b/.buildkite/scripts/steps/demo_env/kibana.sh index 591919e7819c4..f10ed4013bc0c 100755 --- a/.buildkite/scripts/steps/demo_env/kibana.sh +++ b/.buildkite/scripts/steps/demo_env/kibana.sh @@ -2,9 +2,6 @@ set -euo pipefail -export DISABLE_BOOTSTRAP_VALIDATION=true -export BUILD_TS_REFS_DISABLE=true - .buildkite/scripts/bootstrap.sh source "$(dirname "${0}")/config.sh" diff --git a/.buildkite/scripts/steps/functional/common.sh b/.buildkite/scripts/steps/functional/common.sh new file mode 100755 index 0000000000000..b60ed835799e5 --- /dev/null +++ b/.buildkite/scripts/steps/functional/common.sh @@ -0,0 +1,10 @@ +#!/usr/bin/env bash + +set -euo pipefail + +source .buildkite/scripts/common/util.sh + +.buildkite/scripts/bootstrap.sh +.buildkite/scripts/download_build_artifacts.sh + +is_test_execution_step diff --git a/.buildkite/scripts/steps/functional/oss_accessibility.sh b/.buildkite/scripts/steps/functional/oss_accessibility.sh new file mode 100755 index 0000000000000..e8c65cfa760b2 --- /dev/null +++ b/.buildkite/scripts/steps/functional/oss_accessibility.sh @@ -0,0 +1,13 @@ +#!/usr/bin/env bash + +set -euo pipefail + +source .buildkite/scripts/steps/functional/common.sh + +echo --- OSS Accessibility Tests + +checks-reporter-with-killswitch "Kibana accessibility tests" \ + node scripts/functional_tests \ + --debug --bail \ + --kibana-install-dir "$KIBANA_BUILD_LOCATION" \ + --config test/accessibility/config.ts diff --git a/.buildkite/scripts/steps/functional/oss_cigroup.sh b/.buildkite/scripts/steps/functional/oss_cigroup.sh index b4c643868ff7d..a7a5960a41afe 100755 --- a/.buildkite/scripts/steps/functional/oss_cigroup.sh +++ b/.buildkite/scripts/steps/functional/oss_cigroup.sh @@ -2,15 +2,15 @@ set -euo pipefail -.buildkite/scripts/bootstrap.sh -.buildkite/scripts/download_build_artifacts.sh +source .buildkite/scripts/steps/functional/common.sh export CI_GROUP=${CI_GROUP:-$((BUILDKITE_PARALLEL_JOB+1))} export JOB=kibana-oss-ciGroup${CI_GROUP} echo "--- OSS CI Group $CI_GROUP" -node scripts/functional_tests \ - --bail \ - --kibana-install-dir "$KIBANA_BUILD_LOCATION" \ - --include-tag "ciGroup$CI_GROUP" +checks-reporter-with-killswitch "Functional tests / Group ${CI_GROUP}" \ + node scripts/functional_tests \ + --bail \ + --kibana-install-dir "$KIBANA_BUILD_LOCATION" \ + --include-tag "ciGroup$CI_GROUP" diff --git a/.buildkite/scripts/steps/functional/oss_firefox.sh b/.buildkite/scripts/steps/functional/oss_firefox.sh new file mode 100755 index 0000000000000..e953973da62d6 --- /dev/null +++ b/.buildkite/scripts/steps/functional/oss_firefox.sh @@ -0,0 +1,14 @@ +#!/usr/bin/env bash + +set -euo pipefail + +source .buildkite/scripts/steps/functional/common.sh + +echo --- OSS Firefox Smoke Tests + +checks-reporter-with-killswitch "Firefox smoke test" \ + node scripts/functional_tests \ + --bail --debug \ + --kibana-install-dir "$KIBANA_BUILD_LOCATION" \ + --include-tag "includeFirefox" \ + --config test/functional/config.firefox.js diff --git a/.buildkite/scripts/steps/functional/oss_misc.sh b/.buildkite/scripts/steps/functional/oss_misc.sh new file mode 100755 index 0000000000000..a57a457ca189a --- /dev/null +++ b/.buildkite/scripts/steps/functional/oss_misc.sh @@ -0,0 +1,46 @@ +#!/usr/bin/env bash + +set -euo pipefail + +# Required, at least for kbn_sample_panel_action +export BUILD_TS_REFS_DISABLE=false + +source .buildkite/scripts/steps/functional/common.sh + +# Required, at least for plugin_functional tests +.buildkite/scripts/build_kibana_plugins.sh + +echo --- Plugin Functional Tests +checks-reporter-with-killswitch "Plugin Functional Tests" \ + node scripts/functional_tests \ + --config test/plugin_functional/config.ts \ + --bail \ + --debug + +echo --- Interpreter Functional Tests +checks-reporter-with-killswitch "Interpreter Functional Tests" \ + node scripts/functional_tests \ + --config test/interpreter_functional/config.ts \ + --bail \ + --debug \ + --kibana-install-dir "$KIBANA_BUILD_LOCATION" + +echo --- Server Integration Tests +checks-reporter-with-killswitch "Server Integration Tests" \ + node scripts/functional_tests \ + --config test/server_integration/http/ssl/config.js \ + --config test/server_integration/http/ssl_redirect/config.js \ + --config test/server_integration/http/platform/config.ts \ + --config test/server_integration/http/ssl_with_p12/config.js \ + --config test/server_integration/http/ssl_with_p12_intermediate/config.js \ + --bail \ + --debug \ + --kibana-install-dir "$KIBANA_BUILD_LOCATION" + +# Tests that must be run against source in order to build test plugins +echo --- Status Integration Tests +checks-reporter-with-killswitch "Status Integration Tests" \ + node scripts/functional_tests \ + --config test/server_integration/http/platform/config.status.ts \ + --bail \ + --debug diff --git a/.buildkite/scripts/steps/functional/xpack_accessibility.sh b/.buildkite/scripts/steps/functional/xpack_accessibility.sh new file mode 100755 index 0000000000000..5b098da858c96 --- /dev/null +++ b/.buildkite/scripts/steps/functional/xpack_accessibility.sh @@ -0,0 +1,15 @@ +#!/usr/bin/env bash + +set -euo pipefail + +source .buildkite/scripts/steps/functional/common.sh + +cd "$XPACK_DIR" + +echo --- Default Accessibility Tests + +checks-reporter-with-killswitch "X-Pack accessibility tests" \ + node scripts/functional_tests \ + --debug --bail \ + --kibana-install-dir "$KIBANA_BUILD_LOCATION" \ + --config test/accessibility/config.ts diff --git a/.buildkite/scripts/steps/functional/xpack_cigroup.sh b/.buildkite/scripts/steps/functional/xpack_cigroup.sh index e6ef0bba87904..6877e88cff8b3 100755 --- a/.buildkite/scripts/steps/functional/xpack_cigroup.sh +++ b/.buildkite/scripts/steps/functional/xpack_cigroup.sh @@ -2,8 +2,7 @@ set -euo pipefail -.buildkite/scripts/bootstrap.sh -.buildkite/scripts/download_build_artifacts.sh +source .buildkite/scripts/steps/functional/common.sh export CI_GROUP=${CI_GROUP:-$((BUILDKITE_PARALLEL_JOB+1))} export JOB=kibana-default-ciGroup${CI_GROUP} @@ -12,7 +11,10 @@ echo "--- Default CI Group $CI_GROUP" cd "$XPACK_DIR" -node scripts/functional_tests \ - --bail \ - --kibana-install-dir "$KIBANA_BUILD_LOCATION" \ - --include-tag "ciGroup$CI_GROUP" +checks-reporter-with-killswitch "X-Pack Chrome Functional tests / Group ${CI_GROUP}" \ + node scripts/functional_tests \ + --bail \ + --kibana-install-dir "$KIBANA_BUILD_LOCATION" \ + --include-tag "ciGroup$CI_GROUP" + +cd "$KIBANA_DIR" diff --git a/.buildkite/scripts/steps/functional/xpack_firefox.sh b/.buildkite/scripts/steps/functional/xpack_firefox.sh new file mode 100755 index 0000000000000..a9a9704ea78de --- /dev/null +++ b/.buildkite/scripts/steps/functional/xpack_firefox.sh @@ -0,0 +1,17 @@ +#!/usr/bin/env bash + +set -euo pipefail + +source .buildkite/scripts/steps/functional/common.sh + +cd "$XPACK_DIR" + +echo --- Default Firefox Smoke Tests + +checks-reporter-with-killswitch "X-Pack firefox smoke test" \ + node scripts/functional_tests \ + --debug --bail \ + --kibana-install-dir "$KIBANA_BUILD_LOCATION" \ + --include-tag "includeFirefox" \ + --config test/functional/config.firefox.js \ + --config test/functional_embedded/config.firefox.ts diff --git a/.buildkite/scripts/steps/functional/xpack_saved_object_field_metrics.sh b/.buildkite/scripts/steps/functional/xpack_saved_object_field_metrics.sh new file mode 100755 index 0000000000000..5e00d2446bf7a --- /dev/null +++ b/.buildkite/scripts/steps/functional/xpack_saved_object_field_metrics.sh @@ -0,0 +1,17 @@ +#!/usr/bin/env bash + +set -euo pipefail + +source .buildkite/scripts/common/util.sh + +.buildkite/scripts/bootstrap.sh +.buildkite/scripts/download_build_artifacts.sh + +cd "$XPACK_DIR" + +echo --- Capture Kibana Saved Objects field count metrics +checks-reporter-with-killswitch "Capture Kibana Saved Objects field count metrics" \ + node scripts/functional_tests \ + --debug --bail \ + --kibana-install-dir "$KIBANA_BUILD_LOCATION" \ + --config test/saved_objects_field_count/config.ts; diff --git a/.buildkite/scripts/steps/lint.sh b/.buildkite/scripts/steps/lint.sh new file mode 100755 index 0000000000000..dace6c6f60aef --- /dev/null +++ b/.buildkite/scripts/steps/lint.sh @@ -0,0 +1,15 @@ +#!/usr/bin/env bash + +set -euo pipefail + +source .buildkite/scripts/common/util.sh + +.buildkite/scripts/bootstrap.sh + +echo '--- Lint: stylelint' +checks-reporter-with-killswitch "Lint: stylelint" \ + node scripts/stylelint + +echo '--- Lint: eslint' +checks-reporter-with-killswitch "Lint: eslint" \ + node scripts/eslint --no-cache diff --git a/.buildkite/scripts/steps/on_merge_build_and_metrics.sh b/.buildkite/scripts/steps/on_merge_build_and_metrics.sh index fdf06981ab568..1f1e492f87bec 100755 --- a/.buildkite/scripts/steps/on_merge_build_and_metrics.sh +++ b/.buildkite/scripts/steps/on_merge_build_and_metrics.sh @@ -2,9 +2,6 @@ set -euo pipefail -export DISABLE_BOOTSTRAP_VALIDATION=true -export BUILD_TS_REFS_DISABLE=true - .buildkite/scripts/bootstrap.sh .buildkite/scripts/build_kibana.sh .buildkite/scripts/post_build_kibana.sh diff --git a/.buildkite/scripts/steps/storybooks/build_and_upload.js b/.buildkite/scripts/steps/storybooks/build_and_upload.js new file mode 100644 index 0000000000000..9d72f518837e9 --- /dev/null +++ b/.buildkite/scripts/steps/storybooks/build_and_upload.js @@ -0,0 +1,106 @@ +const execSync = require('child_process').execSync; +const fs = require('fs'); +const path = require('path'); + +// TODO - how to generate this dynamically? +const STORYBOOKS = [ + 'apm', + 'canvas', + 'ci_composite', + 'url_template_editor', + 'codeeditor', + 'dashboard', + 'dashboard_enhanced', + 'data_enhanced', + 'embeddable', + 'infra', + 'security_solution', + 'ui_actions_enhanced', + 'observability', + 'presentation', + 'lists', +]; + +const GITHUB_CONTEXT = 'Build and Publish Storybooks'; + +const STORYBOOK_DIRECTORY = + process.env.BUILDKITE_PULL_REQUEST && process.env.BUILDKITE_PULL_REQUEST !== 'false' + ? `pr-${process.env.BUILDKITE_PULL_REQUEST}` + : process.env.BUILDKITE_BRANCH.replace('/', '__'); +const STORYBOOK_BUCKET = 'ci-artifacts.kibana.dev/storybooks'; +const STORYBOOK_BUCKET_URL = `https://${STORYBOOK_BUCKET}/${STORYBOOK_DIRECTORY}`; +const STORYBOOK_BASE_URL = `${STORYBOOK_BUCKET_URL}/${process.env.BUILDKITE_COMMIT}`; + +const exec = (...args) => execSync(args.join(' '), { stdio: 'inherit' }); + +const ghStatus = (state, description) => + exec( + `gh api "repos/elastic/kibana/statuses/${process.env.BUILDKITE_COMMIT}"`, + `-f state=${state}`, + `-f target_url="${process.env.BUILDKITE_BUILD_URL}"`, + `-f context="${GITHUB_CONTEXT}"`, + `-f description="${description}"`, + `--silent` + ); + +const build = () => { + console.log('--- Building Storybooks'); + + for (const storybook of STORYBOOKS) { + exec(`STORYBOOK_BASE_URL=${STORYBOOK_BASE_URL}`, `yarn storybook --site ${storybook}`); + } +}; + +const upload = () => { + const originalDirectory = process.cwd(); + try { + console.log('--- Generating Storybooks HTML'); + + process.chdir(path.join('.', 'built_assets', 'storybook')); + fs.renameSync('ci_composite', 'composite'); + + const storybooks = execSync(`ls -1d */`) + .toString() + .trim() + .split('\n') + .map((path) => path.replace('/', '')) + .filter((path) => path != 'composite'); + + const listHtml = storybooks + .map((storybook) => `
  • ${storybook}
  • `) + .join('\n'); + + const html = ` + + +

    Storybooks

    +

    Composite Storybook

    +

    All

    + + + + `; + + fs.writeFileSync('index.html', html); + + console.log('--- Uploading Storybooks'); + exec(` + gsutil -q -m cp -r -z js,css,html,json,map,txt,svg '*' 'gs://${STORYBOOK_BUCKET}/${STORYBOOK_DIRECTORY}/${process.env.BUILDKITE_COMMIT}/' + gsutil -h "Cache-Control:no-cache, max-age=0, no-transform" cp -z html 'index.html' 'gs://${STORYBOOK_BUCKET}/${STORYBOOK_DIRECTORY}/latest/' + `); + } finally { + process.chdir(originalDirectory); + } +}; + +try { + ghStatus('pending', 'Building Storybooks'); + build(); + upload(); + ghStatus('success', 'Storybooks built'); +} catch (error) { + ghStatus('error', 'Building Storybooks failed'); + throw error; +} diff --git a/.buildkite/scripts/steps/storybooks/build_and_upload.sh b/.buildkite/scripts/steps/storybooks/build_and_upload.sh new file mode 100755 index 0000000000000..9f8343da18a72 --- /dev/null +++ b/.buildkite/scripts/steps/storybooks/build_and_upload.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash + +set -euo pipefail + +.buildkite/scripts/bootstrap.sh + +node .buildkite/scripts/steps/storybooks/build_and_upload.js diff --git a/.buildkite/scripts/steps/test/api_integration.sh b/.buildkite/scripts/steps/test/api_integration.sh index 4bf1ed1406ac5..f56e98903d226 100755 --- a/.buildkite/scripts/steps/test/api_integration.sh +++ b/.buildkite/scripts/steps/test/api_integration.sh @@ -2,10 +2,15 @@ set -euo pipefail +source .buildkite/scripts/common/util.sh + +is_test_execution_step + .buildkite/scripts/bootstrap.sh -echo '--- API Integration Tests' -node scripts/functional_tests \ - --config test/api_integration/config.js \ - --bail \ - --debug +echo --- API Integration Tests +checks-reporter-with-killswitch "API Integration Tests" \ + node scripts/functional_tests \ + --config test/api_integration/config.js \ + --bail \ + --debug diff --git a/.buildkite/scripts/steps/test/jest.sh b/.buildkite/scripts/steps/test/jest.sh index ab9be759b43a5..2c4e3fe21902d 100755 --- a/.buildkite/scripts/steps/test/jest.sh +++ b/.buildkite/scripts/steps/test/jest.sh @@ -2,7 +2,12 @@ set -euo pipefail +source .buildkite/scripts/common/util.sh + +is_test_execution_step + .buildkite/scripts/bootstrap.sh echo '--- Jest' -node scripts/jest --ci --verbose --maxWorkers=13 +checks-reporter-with-killswitch "Jest Unit Tests" \ + node scripts/jest --ci --verbose --maxWorkers=10 diff --git a/.buildkite/scripts/steps/test/jest_integration.sh b/.buildkite/scripts/steps/test/jest_integration.sh index eb243e55670e3..9f0228fd910bf 100755 --- a/.buildkite/scripts/steps/test/jest_integration.sh +++ b/.buildkite/scripts/steps/test/jest_integration.sh @@ -2,7 +2,12 @@ set -euo pipefail +source .buildkite/scripts/common/util.sh + +is_test_execution_step + .buildkite/scripts/bootstrap.sh echo '--- Jest Integration Tests' -node scripts/jest_integration --ci --verbose +checks-reporter-with-killswitch "Jest Integration Tests" \ + node scripts/jest_integration --ci --verbose diff --git a/.ci/ci_groups.yml b/.ci/ci_groups.yml index 6d1fb2234406c..9c3a039f51166 100644 --- a/.ci/ci_groups.yml +++ b/.ci/ci_groups.yml @@ -10,7 +10,6 @@ root: - ciGroup9 - ciGroup10 - ciGroup11 - - ciGroup12 xpack: - ciGroup1 diff --git a/packages/kbn-test/src/failed_tests_reporter/es_config b/packages/kbn-test/src/failed_tests_reporter/es_config new file mode 100644 index 0000000000000..2720c0be42962 --- /dev/null +++ b/packages/kbn-test/src/failed_tests_reporter/es_config @@ -0,0 +1,138 @@ +PUT _ilm/policy/test-failures-policy +{ + "policy": { + "phases": { + "hot": { + "actions": { + "rollover": { + "max_primary_shard_size": "50gb" + } + } + }, + "warm": { + "min_age": "30d", + "actions": { + "shrink": { + "number_of_shards": 1 + }, + "forcemerge": { + "max_num_segments": 1 + } + } + }, + "cold": { + "min_age": "60d", + "actions": { + "searchable_snapshot": { + "snapshot_repository": "found-snapshots" + } + } + }, + "frozen": { + "min_age": "90d", + "actions": { + "searchable_snapshot": { + "snapshot_repository": "found-snapshots" + } + } + }, + "delete": { + "min_age": "735d", + "actions": { + "delete": {} + } + } + } + } +} + +# Creates a component template for mappings +PUT _component_template/test-failures-mappings +{ + "template": { + "mappings": { + "properties": { + "@timestamp": { + "type": "date", + "format": "date_optional_time||epoch_millis" + }, + "build": { + "properties": { + "id": { + "type": "keyword", + "ignore_above": 256 + }, + "jobId": { + "type": "keyword", + "ignore_above": 256 + }, + "name": { + "type": "keyword" + }, + "url": { + "type": "keyword" + } + } + }, + "failure": { + "properties": { + "classname": { + "type": "keyword", + "ignore_above": 256 + }, + "failure": { + "type": "keyword", + "ignore_above": 256 + }, + "likelyIrrelevant": { + "type": "boolean" + }, + "name": { + "type": "keyword" + }, + "system-out": { + "type": "match_only_text" + }, + "time": { + "type": "double" + } + } + }, + "git": { + "properties": { + "branch": { + "type": "keyword", + "ignore_above": 256 + }, + "commit": { + "type": "keyword", + "ignore_above": 256 + }, + "repo": { + "type": "keyword", + "ignore_above": 256 + } + } + } + } + } + } +} + +# Creates a component template for index settings +PUT _component_template/test-failures-settings +{ + "template": { + "settings": { + "index.lifecycle.name": "test-failures-policy" + } + } +} + +PUT _index_template/test-failures-index-template +{ + "index_patterns": ["test-failures*"], + "data_stream": { }, + "composed_of": [ "test-failures-mappings", "test-failures-settings" ], + "priority": 500 +} diff --git a/packages/kbn-test/src/failed_tests_reporter/get_failures.test.ts b/packages/kbn-test/src/failed_tests_reporter/get_failures.test.ts index c10afc49d2ca8..77d7cd93ce4b0 100644 --- a/packages/kbn-test/src/failed_tests_reporter/get_failures.test.ts +++ b/packages/kbn-test/src/failed_tests_reporter/get_failures.test.ts @@ -26,6 +26,13 @@ it('discovers failures in ftr report', async () => { ", "likelyIrrelevant": false, "name": "maps app maps loaded from sample data ecommerce \\"before all\\" hook", + "system-out": " + [00:00:00] │ + [00:07:04] └-: maps app + ... + [00:15:02] │ + + ", "time": "154.378", }, Object { @@ -39,6 +46,12 @@ it('discovers failures in ftr report', async () => { "likelyIrrelevant": true, "metadata-json": "{\\"messages\\":[\\"foo\\"],\\"screenshots\\":[{\\"name\\":\\"failure[dashboard app using current data dashboard snapshots compare TSVB snapshot]\\",\\"url\\":\\"https://storage.googleapis.com/kibana-ci-artifacts/jobs/elastic+kibana+7.x/1632/kibana-oss-tests/test/functional/screenshots/failure/dashboard%20app%20using%20current%20data%20dashboard%20snapshots%20compare%20TSVB%20snapshot.png\\"}]}", "name": "maps app \\"after all\\" hook", + "system-out": " + [00:00:00] │ + [00:07:04] └-: maps app + ... + + ", "time": "0.179", }, Object { @@ -50,6 +63,7 @@ it('discovers failures in ftr report', async () => { at process._tickCallback (internal/process/next_tick.js:68:7) name: 'NoSuchSessionError', remoteStacktrace: '' }", "likelyIrrelevant": true, "name": "machine learning anomaly detection saved search with lucene query job creation opens the advanced section", + "system-out": "[00:21:57] └-: machine learning...", "time": "6.040", }, ] @@ -68,6 +82,7 @@ it('discovers failures in jest report', async () => { ", "likelyIrrelevant": false, "name": "launcher can reconnect if process died", + "system-out": "", "time": "7.060", }, ] @@ -95,6 +110,9 @@ it('discovers failures in mocha report', async () => { ", "likelyIrrelevant": true, "name": "code in multiple nodes \\"before all\\" hook", + "system-out": " + + ", "time": "0.121", }, Object { @@ -106,6 +124,9 @@ it('discovers failures in mocha report', async () => { ", "likelyIrrelevant": true, "name": "code in multiple nodes \\"after all\\" hook", + "system-out": " + + ", "time": "0.003", }, ] diff --git a/packages/kbn-test/src/failed_tests_reporter/get_failures.ts b/packages/kbn-test/src/failed_tests_reporter/get_failures.ts index c5e03f8b7af95..45c7261e0fd9b 100644 --- a/packages/kbn-test/src/failed_tests_reporter/get_failures.ts +++ b/packages/kbn-test/src/failed_tests_reporter/get_failures.ts @@ -13,16 +13,21 @@ import { FailedTestCase, TestReport, makeFailedTestCaseIter } from './test_repor export type TestFailure = FailedTestCase['$'] & { failure: string; likelyIrrelevant: boolean; + 'system-out'?: string; }; -const getFailureText = (failure: FailedTestCase['failure']) => { - const [failureNode] = failure; +const getText = (node?: Array) => { + if (!node) { + return ''; + } + + const [nodeWrapped] = node; - if (failureNode && typeof failureNode === 'object' && typeof failureNode._ === 'string') { - return stripAnsi(failureNode._); + if (nodeWrapped && typeof nodeWrapped === 'object' && typeof nodeWrapped._ === 'string') { + return stripAnsi(nodeWrapped._); } - return stripAnsi(String(failureNode)); + return stripAnsi(String(nodeWrapped)); }; const isLikelyIrrelevant = (name: string, failure: string) => { @@ -62,7 +67,7 @@ export function getFailures(report: TestReport) { const failures: TestFailure[] = []; for (const testCase of makeFailedTestCaseIter(report)) { - const failure = getFailureText(testCase.failure); + const failure = getText(testCase.failure); const likelyIrrelevant = isLikelyIrrelevant(testCase.$.name, failure); failures.push({ @@ -71,6 +76,7 @@ export function getFailures(report: TestReport) { // Strip ANSI color characters failure, likelyIrrelevant, + 'system-out': getText(testCase['system-out']), }); } diff --git a/packages/kbn-test/src/failed_tests_reporter/report_failure.test.ts b/packages/kbn-test/src/failed_tests_reporter/report_failure.test.ts index 146beead7b764..b2cc8d6d8ffb6 100644 --- a/packages/kbn-test/src/failed_tests_reporter/report_failure.test.ts +++ b/packages/kbn-test/src/failed_tests_reporter/report_failure.test.ts @@ -40,7 +40,7 @@ describe('createFailureIssue()', () => { this is the failure text \`\`\` - First failure: [Jenkins Build](https://build-url) + First failure: [CI Build](https://build-url) ", Array [ @@ -100,7 +100,7 @@ describe('updateFailureIssue()', () => { "calls": Array [ Array [ 1234, - "New failure: [Jenkins Build](https://build-url)", + "New failure: [CI Build](https://build-url)", ], ], "results": Array [ diff --git a/packages/kbn-test/src/failed_tests_reporter/report_failure.ts b/packages/kbn-test/src/failed_tests_reporter/report_failure.ts index 16c77e047de9b..c881bc39abf61 100644 --- a/packages/kbn-test/src/failed_tests_reporter/report_failure.ts +++ b/packages/kbn-test/src/failed_tests_reporter/report_failure.ts @@ -21,7 +21,7 @@ export async function createFailureIssue(buildUrl: string, failure: TestFailure, failure.failure, '```', '', - `First failure: [Jenkins Build](${buildUrl})`, + `First failure: [CI Build](${buildUrl})`, ].join('\n'), { 'test.class': failure.classname, @@ -41,7 +41,7 @@ export async function updateFailureIssue(buildUrl: string, issue: GithubIssueMin }); await api.editIssueBodyAndEnsureOpen(issue.number, newBody); - await api.addIssueComment(issue.number, `New failure: [Jenkins Build](${buildUrl})`); + await api.addIssueComment(issue.number, `New failure: [CI Build](${buildUrl})`); return newCount; } diff --git a/packages/kbn-test/src/failed_tests_reporter/report_failures_to_es.ts b/packages/kbn-test/src/failed_tests_reporter/report_failures_to_es.ts new file mode 100644 index 0000000000000..754ce2567cb80 --- /dev/null +++ b/packages/kbn-test/src/failed_tests_reporter/report_failures_to_es.ts @@ -0,0 +1,66 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { Client } from '@elastic/elasticsearch'; +import { createFailError, ToolingLog } from '@kbn/dev-utils'; + +import { TestFailure } from './get_failures'; + +export async function reportFailuresToEs(log: ToolingLog, failures: TestFailure[]) { + if (!failures?.length) { + return; + } + + if ( + !process.env.TEST_FAILURES_ES_CLOUD_ID || + !process.env.TEST_FAILURES_ES_USERNAME || + !process.env.TEST_FAILURES_ES_PASSWORD + ) { + throw createFailError( + 'TEST_FAILURES_ES_CLOUD_ID, TEST_FAILURES_ES_USERNAME, TEST_FAILURES_ES_PASSWORD must be provided to index test failures' + ); + } + + const client = new Client({ + cloud: { + id: process.env.TEST_FAILURES_ES_CLOUD_ID, + }, + auth: { + username: process.env.TEST_FAILURES_ES_USERNAME, + password: process.env.TEST_FAILURES_ES_PASSWORD, + }, + }); + + const body = failures.flatMap((failure) => [ + { + create: { + _index: 'test-failures', + }, + }, + { + '@timestamp': new Date(), + failure, + build: { + id: process.env.BUILDKITE_BUILD_ID, + name: process.env.BUILDKITE_PIPELINE_NAME, + jobId: process.env.BUILDKITE_JOB_ID, + url: process.env.BUILDKITE_BUILD_URL, + }, + git: { + repo: process.env.BUILDKITE_REPO, + branch: process.env.BUILDKITE_BRANCH, + commit: process.env.BUILDKITE_COMMIT, + }, + }, + ]); + + const resp = await client.bulk({ body }); + if (resp?.body?.errors) { + log.error(JSON.stringify(resp.body.items, null, 2)); + } +} diff --git a/packages/kbn-test/src/failed_tests_reporter/run_failed_tests_reporter_cli.ts b/packages/kbn-test/src/failed_tests_reporter/run_failed_tests_reporter_cli.ts index 63eca93def64d..d4bf625ee2d3b 100644 --- a/packages/kbn-test/src/failed_tests_reporter/run_failed_tests_reporter_cli.ts +++ b/packages/kbn-test/src/failed_tests_reporter/run_failed_tests_reporter_cli.ts @@ -20,12 +20,15 @@ import { getIssueMetadata } from './issue_metadata'; import { readTestReport } from './test_report'; import { addMessagesToReport } from './add_messages_to_report'; import { getReportMessageIter } from './report_metadata'; +import { reportFailuresToEs } from './report_failures_to_es'; const DEFAULT_PATTERNS = [Path.resolve(REPO_ROOT, 'target/junit/**/*.xml')]; export function runFailedTestsReporterCli() { run( async ({ log, flags }) => { + const indexInEs = flags['index-errors']; + let updateGithub = flags['github-update']; if (updateGithub && !process.env.GITHUB_TOKEN) { throw createFailError( @@ -34,16 +37,25 @@ export function runFailedTestsReporterCli() { } if (updateGithub) { - // JOB_NAME is formatted as `elastic+kibana+7.x` in some places and `elastic+kibana+7.x/JOB=kibana-intake,node=immutable` in others - const jobNameSplit = (process.env.JOB_NAME || '').split(/\+|\//); - const branch = jobNameSplit.length >= 3 ? jobNameSplit[2] : process.env.GIT_BRANCH; + let branch: string | undefined = ''; + let isPr = false; + + if (process.env.BUILDKITE === 'true') { + branch = process.env.BUILDKITE_BRANCH; + isPr = process.env.BUILDKITE_PULL_REQUEST === 'true'; + } else { + // JOB_NAME is formatted as `elastic+kibana+7.x` in some places and `elastic+kibana+7.x/JOB=kibana-intake,node=immutable` in others + const jobNameSplit = (process.env.JOB_NAME || '').split(/\+|\//); + branch = jobNameSplit.length >= 3 ? jobNameSplit[2] : process.env.GIT_BRANCH; + isPr = !!process.env.ghprbPullId; + } + if (!branch) { throw createFailError( 'Unable to determine originating branch from job name or other environment variables' ); } - const isPr = !!process.env.ghprbPullId; const isMasterOrVersion = branch === 'master' || branch.match(/^\d+\.(x|\d+)$/); if (!isMasterOrVersion || isPr) { log.info('Failure issues only created on master/version branch jobs'); @@ -83,8 +95,13 @@ export function runFailedTestsReporterCli() { for (const reportPath of reportPaths) { const report = await readTestReport(reportPath); const messages = Array.from(getReportMessageIter(report)); + const failures = await getFailures(report); + + if (indexInEs) { + await reportFailuresToEs(log, failures); + } - for (const failure of await getFailures(report)) { + for (const failure of failures) { const pushMessage = (msg: string) => { messages.push({ classname: failure.classname, @@ -153,11 +170,13 @@ export function runFailedTestsReporterCli() { default: { 'github-update': true, 'report-update': true, + 'index-errors': true, 'build-url': process.env.BUILD_URL, }, help: ` --no-github-update Execute the CLI without writing to Github --no-report-update Execute the CLI without writing to the JUnit reports + --no-index-errors Execute the CLI without indexing failures into Elasticsearch --build-url URL of the failed build, defaults to process.env.BUILD_URL `, }, diff --git a/packages/kbn-test/src/report_path.ts b/packages/kbn-test/src/report_path.ts index dcda0f5eb2d3c..faa069384b428 100644 --- a/packages/kbn-test/src/report_path.ts +++ b/packages/kbn-test/src/report_path.ts @@ -17,7 +17,7 @@ export function getUniqueJunitReportPath( counter?: number ): string { const BUILDKITE_ID_SUFFIX = process.env.BUILDKITE_JOB_ID - ? `-${process.env.BUILDKITE_JOB_ID}` + ? `-bk__${process.env.BUILDKITE_JOB_ID}` : ''; const path = Path.resolve( diff --git a/test/functional/apps/bundles/index.js b/test/functional/apps/bundles/index.js index d13e74dd4eed9..73c5a04ea2018 100644 --- a/test/functional/apps/bundles/index.js +++ b/test/functional/apps/bundles/index.js @@ -14,7 +14,7 @@ export default function ({ getService }) { const supertest = getService('supertest'); describe('bundle compression', function () { - this.tags(['ciGroup12', 'skipCoverage']); + this.tags(['ciGroup11', 'skipCoverage']); let buildNum; before(async () => { diff --git a/test/functional/apps/visualize/index.ts b/test/functional/apps/visualize/index.ts index dff57e6b96265..878c7b88341af 100644 --- a/test/functional/apps/visualize/index.ts +++ b/test/functional/apps/visualize/index.ts @@ -85,8 +85,8 @@ export default function ({ getService, loadTestFile }: FtrProviderContext) { loadTestFile(require.resolve('./_add_to_dashboard.ts')); }); - describe('visualize ciGroup12', function () { - this.tags('ciGroup12'); + describe('visualize ciGroup11', function () { + this.tags('ciGroup11'); loadTestFile(require.resolve('./_tag_cloud')); loadTestFile(require.resolve('./_tsvb_chart')); diff --git a/vars/kibanaCoverage.groovy b/vars/kibanaCoverage.groovy index 2109f3e0bab7b..c9415a84ce045 100644 --- a/vars/kibanaCoverage.groovy +++ b/vars/kibanaCoverage.groovy @@ -224,7 +224,6 @@ def ossProks() { 'oss-ciGroup9' : kibanaPipeline.ossCiGroupProcess(9), 'oss-ciGroup10': kibanaPipeline.ossCiGroupProcess(10), 'oss-ciGroup11': kibanaPipeline.ossCiGroupProcess(11), - 'oss-ciGroup12': kibanaPipeline.ossCiGroupProcess(12), ] } diff --git a/vars/kibanaPipeline.groovy b/vars/kibanaPipeline.groovy index 2b30e558eb904..21e41ce55781f 100644 --- a/vars/kibanaPipeline.groovy +++ b/vars/kibanaPipeline.groovy @@ -351,7 +351,7 @@ def runErrorReporter(workspaces) { bash( """ source src/dev/ci_setup/setup_env.sh - node scripts/report_failed_tests ${dryRun} ${globs} + node scripts/report_failed_tests --no-index-errors ${dryRun} ${globs} """, "Report failed tests, if necessary" ) diff --git a/vars/tasks.groovy b/vars/tasks.groovy index 7ae8be25c93ab..1437101cb1d63 100644 --- a/vars/tasks.groovy +++ b/vars/tasks.groovy @@ -39,7 +39,7 @@ def test() { } def ossCiGroups() { - def ciGroups = 1..12 + def ciGroups = 1..11 tasks(ciGroups.collect { kibanaPipeline.ossCiGroupProcess(it, true) }) }