Skip to content

Commit

Permalink
Merge branch 'main' into fix-custom-pipeline-only-main-pipelines
Browse files Browse the repository at this point in the history
  • Loading branch information
kibanamachine authored Oct 31, 2022
2 parents 01e6b50 + fdce066 commit 7fbfc76
Show file tree
Hide file tree
Showing 2,321 changed files with 68,912 additions and 25,634 deletions.
4 changes: 3 additions & 1 deletion .buildkite/ftr_configs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,8 @@ enabled:
- x-pack/test/functional/apps/lens/group1/config.ts
- x-pack/test/functional/apps/lens/group2/config.ts
- x-pack/test/functional/apps/lens/group3/config.ts
- x-pack/test/functional/apps/lens/open_in_lens/config.ts
- x-pack/test/functional/apps/lens/open_in_lens/tsvb/config.ts
- x-pack/test/functional/apps/lens/open_in_lens/agg_based/config.ts
- x-pack/test/functional/apps/license_management/config.ts
- x-pack/test/functional/apps/logstash/config.ts
- x-pack/test/functional/apps/management/config.ts
Expand Down Expand Up @@ -271,6 +272,7 @@ enabled:
- x-pack/test/upgrade_assistant_integration/config.js
- x-pack/test/usage_collection/config.ts
- x-pack/performance/journeys/ecommerce_dashboard.ts
- x-pack/performance/journeys/ecommerce_dashboard_map_only.ts
- x-pack/performance/journeys/flight_dashboard.ts
- x-pack/performance/journeys/login.ts
- x-pack/performance/journeys/many_fields_discover.ts
Expand Down
11 changes: 0 additions & 11 deletions .buildkite/scripts/bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,3 @@ if [[ "$DISABLE_BOOTSTRAP_VALIDATION" != "true" ]]; then
check_for_changed_files 'yarn kbn bootstrap'
fi

###
### upload ts-refs-cache artifacts as quickly as possible so they are available for download
###
if [[ "${BUILD_TS_REFS_CACHE_CAPTURE:-}" == "true" ]]; then
echo "--- Build ts-refs-cache"
node scripts/build_ts_refs.js --ignore-type-failures
echo "--- Upload ts-refs-cache"
cd "$KIBANA_DIR/target/ts_refs_cache"
gsutil cp "*.zip" 'gs://kibana-ci-ts-refs-cache/'
cd "$KIBANA_DIR"
fi
12 changes: 0 additions & 12 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 All @@ -106,11 +99,6 @@ export GCS_UPLOAD_PREFIX=FAKE_UPLOAD_PREFIX # TODO remove the need for this

export KIBANA_BUILD_LOCATION="$WORKSPACE/kibana-build-xpack"

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

export BUILD_TS_REFS_DISABLE=true
export DISABLE_BOOTSTRAP_VALIDATION=true

# Prevent Browserlist from logging on CI about outdated database versions
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
7 changes: 2 additions & 5 deletions .buildkite/scripts/steps/build_api_docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,8 @@ set -euo pipefail

.buildkite/scripts/bootstrap.sh

echo "--- Build TS Refs"
node scripts/build_ts_refs \
--clean \
--no-cache \
--force
echo "--- Run scripts/type_check to ensure that all build available"
node scripts/type_check

echo "--- Build API Docs"
node --max-old-space-size=12000 scripts/build_api_docs
Expand Down
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 --concurrency 8
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
3 changes: 1 addition & 2 deletions .buildkite/scripts/steps/functional/observability_plugin.sh
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}\"}
8 changes: 3 additions & 5 deletions .buildkite/scripts/steps/functional/osquery_cypress.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,14 @@ set -euo pipefail

source .buildkite/scripts/common/util.sh

export BUILD_TS_REFS_DISABLE=false
.buildkite/scripts/bootstrap.sh
node scripts/build_kibana_platform_plugins.js

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
4 changes: 1 addition & 3 deletions .buildkite/scripts/steps/lint_with_types.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@ set -euo pipefail

source .buildkite/scripts/common/util.sh

export BUILD_TS_REFS_DISABLE=false
.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
3 changes: 0 additions & 3 deletions .buildkite/scripts/steps/on_merge_ts_refs_api_docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@
set -euo pipefail

export BAZEL_CACHE_MODE=buildbuddy # Populate Buildbuddy bazel remote cache for linux
export BUILD_TS_REFS_CACHE_ENABLE=true
export BUILD_TS_REFS_CACHE_CAPTURE=true
export DISABLE_BOOTSTRAP_VALIDATION=true
export BUILD_TS_REFS_DISABLE=false

.buildkite/scripts/bootstrap.sh

Expand Down
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
3 changes: 0 additions & 3 deletions .ci/Jenkinsfile_baseline_capture
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@ kibanaPipeline(timeoutMinutes: 210) {
) {
withGcpServiceAccount.fromVaultSecret('secret/kibana-issues/dev/ci-artifacts-key', 'value') {
withEnv([
'BUILD_TS_REFS_DISABLE=false', // disabled in root config so we need to override that here
'BUILD_TS_REFS_CACHE_ENABLE=true',
'BUILD_TS_REFS_CACHE_CAPTURE=true',
'DISABLE_BOOTSTRAP_VALIDATION=true',
]) {
kibanaPipeline.doSetup()
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/add-fleet-issues-to-ingest-project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
project_id: ${{ env.INGEST_PROJECT_ID }}
content_id: ${{ github.event.issue.node_id }}
env:
GITHUB_TOKEN: ${{ secrets.FLEET_TECH_KIBANA_USER_TOKEN }}
GITHUB_TOKEN: ${{ secrets.FLEET_PROJECT_TOKEN }}
- uses: octokit/[email protected]
id: set_fleet_ui_area
if: github.event.label.name == env.FLEET_LABEL
Expand All @@ -48,4 +48,4 @@ jobs:
area_field_id: ${{ env.AREA_FIELD_ID }}
area_id: ${{ env.FLEET_UI_OPTION_ID }}
env:
GITHUB_TOKEN: ${{ secrets.FLEET_TECH_KIBANA_USER_TOKEN }}
GITHUB_TOKEN: ${{ secrets.FLEET_PROJECT_TOKEN }}
Loading

0 comments on commit 7fbfc76

Please sign in to comment.