Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions .buildkite/scripts/common/env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,6 @@ if is_pr; then
export ELASTIC_APM_CONTEXT_PROPAGATION_ONLY=true
fi

if [[ "${GITHUB_STEP_COMMIT_STATUS_ENABLED:-}" != "true" ]]; then
export CHECKS_REPORTER_ACTIVE=true
else
export CHECKS_REPORTER_ACTIVE=false
fi

# 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
export ghprbGhRepository="elastic/kibana"
Expand All @@ -83,7 +77,6 @@ if is_pr; then
else
export ELASTIC_APM_ACTIVE=true
export ELASTIC_APM_CONTEXT_PROPAGATION_ONLY=false
export CHECKS_REPORTER_ACTIVE=false
fi

# These are for backwards-compatibility
Expand Down
9 changes: 0 additions & 9 deletions .buildkite/scripts/common/util.sh
Original file line number Diff line number Diff line change
@@ -1,14 +1,5 @@
#!/usr/bin/env bash

checks-reporter-with-killswitch() {
if [ "$CHECKS_REPORTER_ACTIVE" == "true" ] ; then
yarn run github-checks-reporter "$@"
else
arguments=("$@");
"${arguments[@]:1}";
fi
}

is_pr() {
[[ "${GITHUB_PR_NUMBER-}" ]] && return
false
Expand Down
9 changes: 4 additions & 5 deletions .buildkite/scripts/saved_object_field_metrics.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ set -euo pipefail
source .buildkite/scripts/common/util.sh

echo '--- Default Saved Object Field 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 x-pack/test/saved_objects_field_count/config.ts
node scripts/functional_tests \
--debug --bail \
--kibana-install-dir "$KIBANA_BUILD_LOCATION" \
--config x-pack/test/saved_objects_field_count/config.ts
3 changes: 1 addition & 2 deletions .buildkite/scripts/steps/check_types.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,4 @@ source .buildkite/scripts/common/util.sh
.buildkite/scripts/bootstrap.sh

echo --- Check Types
checks-reporter-with-killswitch "Check Types" \
node scripts/type_check
node scripts/type_check
3 changes: 1 addition & 2 deletions .buildkite/scripts/steps/checks/bundle_limits.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,4 @@ 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
node scripts/build_kibana_platform_plugins --validate-limits
3 changes: 1 addition & 2 deletions .buildkite/scripts/steps/checks/file_casing.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,4 @@ 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
node scripts/check_file_casing --quiet
3 changes: 1 addition & 2 deletions .buildkite/scripts/steps/checks/ftr_configs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,4 @@ set -euo pipefail
source .buildkite/scripts/common/util.sh

echo --- Check FTR Configs
checks-reporter-with-killswitch "Check FTR Configs" \
node scripts/check_ftr_configs
node scripts/check_ftr_configs
3 changes: 1 addition & 2 deletions .buildkite/scripts/steps/checks/i18n.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,4 @@ set -euo pipefail
source .buildkite/scripts/common/util.sh

echo --- Check i18n
checks-reporter-with-killswitch "Check i18n" \
node scripts/i18n_check --ignore-missing
node scripts/i18n_check --ignore-missing
3 changes: 1 addition & 2 deletions .buildkite/scripts/steps/checks/jest_configs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,4 @@ 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
node scripts/check_jest_configs
3 changes: 1 addition & 2 deletions .buildkite/scripts/steps/checks/licenses.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,4 @@ set -euo pipefail
source .buildkite/scripts/common/util.sh

echo --- Check Licenses
checks-reporter-with-killswitch "Check Licenses" \
node scripts/check_licenses --dev
node scripts/check_licenses --dev
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,4 @@ 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
node scripts/find_plugins_with_circular_deps
3 changes: 1 addition & 2 deletions .buildkite/scripts/steps/checks/telemetry.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,4 @@ set -euo pipefail
source .buildkite/scripts/common/util.sh

echo --- Check Telemetry Schema
checks-reporter-with-killswitch "Check Telemetry Schema" \
node scripts/telemetry_check
node scripts/telemetry_check
3 changes: 1 addition & 2 deletions .buildkite/scripts/steps/checks/test_hardening.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,4 @@ set -euo pipefail
source .buildkite/scripts/common/util.sh

echo --- Test Hardening
checks-reporter-with-killswitch "Test Hardening" \
node scripts/test_hardening
node scripts/test_hardening
3 changes: 1 addition & 2 deletions .buildkite/scripts/steps/checks/test_projects.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,4 @@ set -euo pipefail
source .buildkite/scripts/common/util.sh

echo --- Test Projects
checks-reporter-with-killswitch "Test Projects" \
yarn kbn run-in-packages test
yarn kbn run-in-packages test
3 changes: 1 addition & 2 deletions .buildkite/scripts/steps/checks/ts_projects.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,4 @@ 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
node scripts/check_ts_projects
3 changes: 1 addition & 2 deletions .buildkite/scripts/steps/checks/verify_notice.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,4 @@ set -euo pipefail
source .buildkite/scripts/common/util.sh

echo --- Verify NOTICE
checks-reporter-with-killswitch "Verify NOTICE" \
node scripts/notice --validate
node scripts/notice --validate
7 changes: 3 additions & 4 deletions .buildkite/scripts/steps/fleet/install_all_packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ source .buildkite/scripts/steps/functional/common.sh

echo '--- Installing all packages'

checks-reporter-with-killswitch "Fleet packages Tests" \
node scripts/functional_tests \
--debug --bail \
--config x-pack/test/fleet_packages/config.ts
node scripts/functional_tests \
--debug --bail \
--config x-pack/test/fleet_packages/config.ts
3 changes: 1 addition & 2 deletions .buildkite/scripts/steps/functional/apm_cypress.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ echo "--- APM Cypress Tests"

cd "$XPACK_DIR"

checks-reporter-with-killswitch "APM Cypress Tests" \
node plugins/apm/scripts/test/e2e.js \
node plugins/apm/scripts/test/e2e.js \
--kibana-install-dir "$KIBANA_BUILD_LOCATION" \
--record \
--key "$APM_CYPRESS_RECORD_KEY"
9 changes: 4 additions & 5 deletions .buildkite/scripts/steps/functional/fleet_cypress.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ export JOB=kibana-fleet-cypress

echo "--- Fleet Cypress tests"

checks-reporter-with-killswitch "Fleet Cypress Tests" \
node scripts/functional_tests \
--debug --bail \
--kibana-install-dir "$KIBANA_BUILD_LOCATION" \
--config x-pack/test/fleet_cypress/cli_config.ts
node scripts/functional_tests \
--debug --bail \
--kibana-install-dir "$KIBANA_BUILD_LOCATION" \
--config x-pack/test/fleet_cypress/cli_config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,4 @@ echo "--- Observability plugin @elastic/synthetics Tests"

cd "$XPACK_DIR"

checks-reporter-with-killswitch "Observability plugin @elastic/synthetics Tests" \
node plugins/observability/scripts/e2e.js --kibana-install-dir "$KIBANA_BUILD_LOCATION" ${GREP:+--grep \"${GREP}\"}
node plugins/observability/scripts/e2e.js --kibana-install-dir "$KIBANA_BUILD_LOCATION" ${GREP:+--grep \"${GREP}\"}
7 changes: 3 additions & 4 deletions .buildkite/scripts/steps/functional/osquery_cypress.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ export JOB=kibana-osquery-cypress

echo "--- Osquery Cypress tests"

checks-reporter-with-killswitch "Osquery Cypress Tests" \
node scripts/functional_tests \
--debug --bail \
--config x-pack/test/osquery_cypress/cli_config.ts
node scripts/functional_tests \
--debug --bail \
--config x-pack/test/osquery_cypress/cli_config.ts

9 changes: 4 additions & 5 deletions .buildkite/scripts/steps/functional/response_ops.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ export JOB=kibana-security-solution-chrome

echo "--- Response Ops Cypress Tests on Security Solution"

checks-reporter-with-killswitch "Response Ops Cypress Tests on Security Solution" \
node scripts/functional_tests \
--debug --bail \
--kibana-install-dir "$KIBANA_BUILD_LOCATION" \
--config x-pack/test/security_solution_cypress/response_ops_cli_config.ts
node scripts/functional_tests \
--debug --bail \
--kibana-install-dir "$KIBANA_BUILD_LOCATION" \
--config x-pack/test/security_solution_cypress/response_ops_cli_config.ts
9 changes: 4 additions & 5 deletions .buildkite/scripts/steps/functional/response_ops_cases.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ export JOB=kibana-security-solution-chrome

echo "--- Response Ops Cases Cypress Tests on Security Solution"

checks-reporter-with-killswitch "Response Ops Cases Cypress Tests on Security Solution" \
node scripts/functional_tests \
--debug --bail \
--kibana-install-dir "$KIBANA_BUILD_LOCATION" \
--config x-pack/test/security_solution_cypress/cases_cli_config.ts
node scripts/functional_tests \
--debug --bail \
--kibana-install-dir "$KIBANA_BUILD_LOCATION" \
--config x-pack/test/security_solution_cypress/cases_cli_config.ts
9 changes: 4 additions & 5 deletions .buildkite/scripts/steps/functional/security_solution.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ export CLI_COUNT=${CLI_COUNT:-$BUILDKITE_PARALLEL_JOB_COUNT}

echo "--- Security Solution tests (Chrome)"

checks-reporter-with-killswitch "Security Solution Cypress Tests (Chrome) $CLI_NUMBER" \
node scripts/functional_tests \
--debug --bail \
--kibana-install-dir "$KIBANA_BUILD_LOCATION" \
--config x-pack/test/security_solution_cypress/cli_config_parallel.ts
node scripts/functional_tests \
--debug --bail \
--kibana-install-dir "$KIBANA_BUILD_LOCATION" \
--config x-pack/test/security_solution_cypress/cli_config_parallel.ts
3 changes: 1 addition & 2 deletions .buildkite/scripts/steps/functional/synthetics.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,4 @@ echo "--- synthetics @elastic/synthetics Tests"

cd "$XPACK_DIR"

checks-reporter-with-killswitch "synthetics @elastic/synthetics Tests" \
node plugins/synthetics/scripts/e2e.js --kibana-install-dir "$KIBANA_BUILD_LOCATION" --grep "MonitorManagement-monitor*"
node plugins/synthetics/scripts/e2e.js --kibana-install-dir "$KIBANA_BUILD_LOCATION" --grep "MonitorManagement-monitor*"
3 changes: 1 addition & 2 deletions .buildkite/scripts/steps/functional/synthetics_plugin.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,4 @@ echo "--- Synthetics plugin @elastic/synthetics Tests"

cd "$XPACK_DIR"

checks-reporter-with-killswitch "Synthetics plugin @elastic/synthetics Tests" \
node plugins/synthetics/scripts/e2e.js --kibana-install-dir "$KIBANA_BUILD_LOCATION" ${GREP:+--grep \"${GREP}\"}
node plugins/synthetics/scripts/e2e.js --kibana-install-dir "$KIBANA_BUILD_LOCATION" ${GREP:+--grep \"${GREP}\"}
3 changes: 1 addition & 2 deletions .buildkite/scripts/steps/functional/ux_synthetics_e2e.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,4 @@ echo "--- User Experience @elastic/synthetics Tests"

cd "$XPACK_DIR"

checks-reporter-with-killswitch "User Experience plugin @elastic/synthetics Tests" \
node plugins/ux/scripts/e2e.js --kibana-install-dir "$KIBANA_BUILD_LOCATION" ${GREP:+--grep \"${GREP}\"}
node plugins/ux/scripts/e2e.js --kibana-install-dir "$KIBANA_BUILD_LOCATION" ${GREP:+--grep \"${GREP}\"}
3 changes: 1 addition & 2 deletions .buildkite/scripts/steps/lint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ source .buildkite/scripts/common/util.sh
.buildkite/scripts/bootstrap.sh

echo '--- Lint: stylelint'
checks-reporter-with-killswitch "Lint: stylelint" \
node scripts/stylelint
node scripts/stylelint
echo "stylelint ✅"

echo '--- Lint: eslint'
Expand Down
3 changes: 1 addition & 2 deletions .buildkite/scripts/steps/lint_with_types.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,4 @@ source .buildkite/scripts/common/util.sh
.buildkite/scripts/bootstrap.sh

echo '--- Lint: eslint (with types)'
checks-reporter-with-killswitch "Lint: eslint (with types)" \
node scripts/eslint_with_types
node scripts/eslint_with_types
5 changes: 1 addition & 4 deletions .buildkite/scripts/steps/test/jest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,5 @@ is_test_execution_step

.buildkite/scripts/bootstrap.sh

JOB=${BUILDKITE_PARALLEL_JOB:-0}

echo '--- Jest'
checks-reporter-with-killswitch "Jest Unit Tests $((JOB+1))" \
.buildkite/scripts/steps/test/jest_parallel.sh jest.config.js
.buildkite/scripts/steps/test/jest_parallel.sh jest.config.js
5 changes: 1 addition & 4 deletions .buildkite/scripts/steps/test/jest_integration.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,5 @@ is_test_execution_step

.buildkite/scripts/bootstrap.sh

JOB=${BUILDKITE_PARALLEL_JOB:-0}

echo '--- Jest Integration Tests'
checks-reporter-with-killswitch "Jest Integration Tests $((JOB+1))" \
.buildkite/scripts/steps/test/jest_parallel.sh jest.integration.config.js
.buildkite/scripts/steps/test/jest_parallel.sh jest.integration.config.js
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -703,7 +703,6 @@
"@cypress/snapshot": "^2.1.7",
"@cypress/webpack-preprocessor": "^5.12.2",
"@elastic/eslint-plugin-eui": "0.0.2",
"@elastic/github-checks-reporter": "0.0.20b3",
"@elastic/makelogs": "^6.0.0",
"@elastic/synthetics": "^1.0.0-beta.22",
"@emotion/babel-preset-css-prop": "^11.10.0",
Expand Down
14 changes: 0 additions & 14 deletions src/dev/ci_setup/setup_env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -148,20 +148,6 @@ if [[ "$ghprbPullId" && "$ghprbGhRepository" == 'elastic/kibana' ]] ; then
export CHECKS_REPORTER_ACTIVE=true
fi

###
### Implements github-checks-reporter kill switch when scripts are called from the command line
### $@ - all arguments
###
function checks-reporter-with-killswitch() {
if [ "$CHECKS_REPORTER_ACTIVE" == "true" ] ; then
yarn run github-checks-reporter "$@"
else
arguments=("$@");
"${arguments[@]:1}";
fi
}

export -f checks-reporter-with-killswitch

source "$KIBANA_DIR/src/dev/ci_setup/load_env_keys.sh"

Expand Down
3 changes: 1 addition & 2 deletions test/scripts/checks/bundle_limits.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,4 @@

source src/dev/ci_setup/setup_env.sh

checks-reporter-with-killswitch "Check Bundle Limits" \
node scripts/build_kibana_platform_plugins --validate-limits
node scripts/build_kibana_platform_plugins --validate-limits
3 changes: 1 addition & 2 deletions test/scripts/checks/commit/commit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,4 @@ source src/dev/ci_setup/setup_env.sh
# 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.
checks-reporter-with-killswitch "Quick commit checks" \
"$(dirname "${0}")/commit_check_runner.sh"
"$(dirname "${0}")/commit_check_runner.sh"
3 changes: 1 addition & 2 deletions test/scripts/checks/file_casing.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,4 @@

source src/dev/ci_setup/setup_env.sh

checks-reporter-with-killswitch "Check File Casing" \
node scripts/check_file_casing --quiet
node scripts/check_file_casing --quiet
3 changes: 1 addition & 2 deletions test/scripts/checks/i18n.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,4 @@

source src/dev/ci_setup/setup_env.sh

checks-reporter-with-killswitch "Check i18n" \
node scripts/i18n_check --ignore-missing
node scripts/i18n_check --ignore-missing
3 changes: 1 addition & 2 deletions test/scripts/checks/jest_configs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,4 @@

source src/dev/ci_setup/setup_env.sh

checks-reporter-with-killswitch "Check Jest Configs" \
node scripts/check_jest_configs
node scripts/check_jest_configs
3 changes: 1 addition & 2 deletions test/scripts/checks/licenses.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,4 @@

source src/dev/ci_setup/setup_env.sh

checks-reporter-with-killswitch "Check Licenses" \
node scripts/check_licenses --dev
node scripts/check_licenses --dev
3 changes: 1 addition & 2 deletions test/scripts/checks/plugins_with_circular_deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,4 @@

source src/dev/ci_setup/setup_env.sh

checks-reporter-with-killswitch "Check Plugins With Circular Dependencies" \
node scripts/find_plugins_with_circular_deps
node scripts/find_plugins_with_circular_deps
3 changes: 1 addition & 2 deletions test/scripts/checks/telemetry.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,4 @@

source src/dev/ci_setup/setup_env.sh

checks-reporter-with-killswitch "Check Telemetry Schema" \
node scripts/telemetry_check
node scripts/telemetry_check
3 changes: 1 addition & 2 deletions test/scripts/checks/test_hardening.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,4 @@

source src/dev/ci_setup/setup_env.sh

checks-reporter-with-killswitch "Test Hardening" \
node scripts/test_hardening
node scripts/test_hardening
3 changes: 1 addition & 2 deletions test/scripts/checks/test_projects.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,4 @@

source src/dev/ci_setup/setup_env.sh

checks-reporter-with-killswitch "Test Projects" \
yarn kbn run-in-packages test
yarn kbn run-in-packages test
3 changes: 1 addition & 2 deletions test/scripts/checks/ts_projects.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,4 @@

source src/dev/ci_setup/setup_env.sh

checks-reporter-with-killswitch "Check TypeScript Projects" \
node scripts/check_ts_projects
node scripts/check_ts_projects
Loading