diff --git a/.buildkite/pipelines/on_merge.yml b/.buildkite/pipelines/on_merge.yml index 0e87d401c196e..67c1c33e4278a 100644 --- a/.buildkite/pipelines/on_merge.yml +++ b/.buildkite/pipelines/on_merge.yml @@ -46,6 +46,21 @@ steps: - exit_status: '-1' limit: 3 + - command: .buildkite/scripts/steps/lint.sh + label: 'Linting' + agents: + image: family/kibana-ubuntu-2004 + imageProject: elastic-images-prod + provider: gcp + machineType: n2-standard-16 + preemptible: true + key: linting + timeout_in_minutes: 60 + retry: + automatic: + - exit_status: '-1' + limit: 3 + - wait - command: .buildkite/scripts/steps/on_merge_api_docs.sh @@ -109,6 +124,7 @@ steps: depends_on: - build - quick_checks + - linting timeout_in_minutes: 60 parallelism: 3 retry: @@ -127,6 +143,7 @@ steps: depends_on: - build - quick_checks + - linting timeout_in_minutes: 60 parallelism: 2 retry: @@ -145,6 +162,7 @@ steps: depends_on: - build - quick_checks + - linting timeout_in_minutes: 60 parallelism: 8 retry: @@ -163,6 +181,7 @@ steps: depends_on: - build - quick_checks + - linting timeout_in_minutes: 60 parallelism: 5 retry: @@ -181,6 +200,7 @@ steps: depends_on: - build - quick_checks + - linting timeout_in_minutes: 60 parallelism: 1 retry: @@ -199,6 +219,7 @@ steps: depends_on: - build - quick_checks + - linting timeout_in_minutes: 60 parallelism: 4 retry: @@ -217,6 +238,7 @@ steps: depends_on: - build - quick_checks + - linting timeout_in_minutes: 60 parallelism: 6 retry: @@ -235,6 +257,7 @@ steps: depends_on: - build - quick_checks + - linting timeout_in_minutes: 60 parallelism: 5 retry: @@ -253,6 +276,7 @@ steps: depends_on: - build - quick_checks + - linting timeout_in_minutes: 60 parallelism: 6 retry: @@ -271,6 +295,7 @@ steps: depends_on: - build - quick_checks + - linting timeout_in_minutes: 60 parallelism: 5 retry: @@ -289,6 +314,7 @@ steps: depends_on: - build - quick_checks + - linting timeout_in_minutes: 60 parallelism: 6 retry: @@ -307,6 +333,7 @@ steps: depends_on: - build - quick_checks + - linting timeout_in_minutes: 60 parallelism: 1 retry: @@ -325,6 +352,7 @@ steps: depends_on: - build - quick_checks + - linting timeout_in_minutes: 60 parallelism: 1 retry: @@ -343,6 +371,7 @@ steps: depends_on: - build - quick_checks + - linting timeout_in_minutes: 60 parallelism: 2 retry: @@ -361,6 +390,7 @@ steps: depends_on: - build - quick_checks + - linting timeout_in_minutes: 60 parallelism: 2 retry: @@ -379,6 +409,7 @@ steps: depends_on: - build - quick_checks + - linting timeout_in_minutes: 60 parallelism: 6 retry: @@ -397,6 +428,7 @@ steps: depends_on: - build - quick_checks + - linting timeout_in_minutes: 60 parallelism: 8 retry: @@ -415,6 +447,7 @@ steps: depends_on: - build - quick_checks + - linting timeout_in_minutes: 60 parallelism: 8 retry: @@ -435,6 +468,7 @@ steps: depends_on: - build - quick_checks + - linting timeout_in_minutes: 60 parallelism: 20 retry: @@ -455,6 +489,7 @@ steps: depends_on: - build - quick_checks + - linting timeout_in_minutes: 60 parallelism: 14 retry: @@ -468,27 +503,13 @@ steps: depends_on: - build - quick_checks + - linting agents: image: family/kibana-ubuntu-2004 imageProject: elastic-images-prod provider: gcp machineType: n2-standard-2 - - command: .buildkite/scripts/steps/lint.sh - label: 'Linting' - agents: - image: family/kibana-ubuntu-2004 - imageProject: elastic-images-prod - provider: gcp - machineType: n2-standard-8 - preemptible: true - key: linting - timeout_in_minutes: 60 - retry: - automatic: - - exit_status: '-1' - limit: 3 - - command: .buildkite/scripts/steps/lint_with_types.sh label: 'Linting (with types)' agents: diff --git a/.buildkite/pipelines/pull_request/apm_cypress.yml b/.buildkite/pipelines/pull_request/apm_cypress.yml index 05194bae83e79..fae87a11da44d 100644 --- a/.buildkite/pipelines/pull_request/apm_cypress.yml +++ b/.buildkite/pipelines/pull_request/apm_cypress.yml @@ -7,6 +7,7 @@ steps: depends_on: - build - quick_checks + - linting timeout_in_minutes: 120 parallelism: 1 # TODO: Set parallelism when apm_cypress handles it retry: diff --git a/.buildkite/pipelines/pull_request/base.yml b/.buildkite/pipelines/pull_request/base.yml index c60d68bd2e88b..8131091ed1dcc 100644 --- a/.buildkite/pipelines/pull_request/base.yml +++ b/.buildkite/pipelines/pull_request/base.yml @@ -32,6 +32,18 @@ steps: - exit_status: '-1' limit: 3 + - command: .buildkite/scripts/steps/lint.sh + label: 'Linting' + agents: + machineType: n2-standard-16 + preemptible: true + key: linting + timeout_in_minutes: 60 + retry: + automatic: + - exit_status: '-1' + limit: 3 + - wait - command: .buildkite/scripts/steps/ci_stats_ready.sh @@ -61,18 +73,6 @@ steps: - exit_status: '*' limit: 1 - - command: .buildkite/scripts/steps/lint.sh - label: 'Linting' - agents: - machineType: n2-standard-8 - preemptible: true - key: linting - timeout_in_minutes: 60 - retry: - automatic: - - exit_status: '-1' - limit: 3 - - command: .buildkite/scripts/steps/check_types.sh label: 'Check Types' agents: diff --git a/.buildkite/pipelines/pull_request/deploy_cloud.yml b/.buildkite/pipelines/pull_request/deploy_cloud.yml index d520822e54f7b..1cf695fc8b7cc 100644 --- a/.buildkite/pipelines/pull_request/deploy_cloud.yml +++ b/.buildkite/pipelines/pull_request/deploy_cloud.yml @@ -7,6 +7,7 @@ steps: depends_on: - build - quick_checks + - linting timeout_in_minutes: 30 soft_fail: true retry: diff --git a/.buildkite/pipelines/pull_request/exploratory_view_plugin.yml b/.buildkite/pipelines/pull_request/exploratory_view_plugin.yml index 72a2ae8ab785b..3b487f3a37353 100644 --- a/.buildkite/pipelines/pull_request/exploratory_view_plugin.yml +++ b/.buildkite/pipelines/pull_request/exploratory_view_plugin.yml @@ -7,6 +7,7 @@ steps: depends_on: - build - quick_checks + - linting timeout_in_minutes: 60 artifact_paths: - 'x-pack/plugins/observability_solution/exploratory_view/e2e/.journeys/**/*' diff --git a/.buildkite/pipelines/pull_request/fips.yml b/.buildkite/pipelines/pull_request/fips.yml index a136b4f91a2c5..a962f3a673491 100644 --- a/.buildkite/pipelines/pull_request/fips.yml +++ b/.buildkite/pipelines/pull_request/fips.yml @@ -7,6 +7,7 @@ steps: depends_on: - build - quick_checks + - linting timeout_in_minutes: 60 soft_fail: true retry: diff --git a/.buildkite/pipelines/pull_request/fleet_cypress.yml b/.buildkite/pipelines/pull_request/fleet_cypress.yml index 2e0365793afc0..61a4d77413017 100644 --- a/.buildkite/pipelines/pull_request/fleet_cypress.yml +++ b/.buildkite/pipelines/pull_request/fleet_cypress.yml @@ -7,6 +7,7 @@ steps: depends_on: - build - quick_checks + - linting timeout_in_minutes: 50 parallelism: 6 retry: diff --git a/.buildkite/pipelines/pull_request/inventory_cypress.yml b/.buildkite/pipelines/pull_request/inventory_cypress.yml index 371cd80b02cdf..71f49d89049bc 100644 --- a/.buildkite/pipelines/pull_request/inventory_cypress.yml +++ b/.buildkite/pipelines/pull_request/inventory_cypress.yml @@ -7,6 +7,7 @@ steps: depends_on: - build - quick_checks + - linting timeout_in_minutes: 120 parallelism: 1 retry: diff --git a/.buildkite/pipelines/pull_request/kbn_handlebars.yml b/.buildkite/pipelines/pull_request/kbn_handlebars.yml index 5da18ce31919c..93809114de94f 100644 --- a/.buildkite/pipelines/pull_request/kbn_handlebars.yml +++ b/.buildkite/pipelines/pull_request/kbn_handlebars.yml @@ -7,6 +7,7 @@ steps: depends_on: - build - quick_checks + - linting timeout_in_minutes: 5 retry: automatic: diff --git a/.buildkite/pipelines/pull_request/observability_onboarding_cypress.yml b/.buildkite/pipelines/pull_request/observability_onboarding_cypress.yml index b5831e7bb471d..9d19e39719f0b 100644 --- a/.buildkite/pipelines/pull_request/observability_onboarding_cypress.yml +++ b/.buildkite/pipelines/pull_request/observability_onboarding_cypress.yml @@ -7,6 +7,7 @@ steps: depends_on: - build - quick_checks + - linting timeout_in_minutes: 120 retry: automatic: diff --git a/.buildkite/pipelines/pull_request/profiling_cypress.yml b/.buildkite/pipelines/pull_request/profiling_cypress.yml index d86fc5a167db6..6e9b78cde0f26 100644 --- a/.buildkite/pipelines/pull_request/profiling_cypress.yml +++ b/.buildkite/pipelines/pull_request/profiling_cypress.yml @@ -7,6 +7,7 @@ steps: depends_on: - build - quick_checks + - linting timeout_in_minutes: 120 parallelism: 2 retry: diff --git a/.buildkite/pipelines/pull_request/response_ops.yml b/.buildkite/pipelines/pull_request/response_ops.yml index 60e2dc32476d5..e7a991dffae19 100644 --- a/.buildkite/pipelines/pull_request/response_ops.yml +++ b/.buildkite/pipelines/pull_request/response_ops.yml @@ -7,6 +7,7 @@ steps: depends_on: - build - quick_checks + - linting timeout_in_minutes: 120 parallelism: 9 retry: diff --git a/.buildkite/pipelines/pull_request/response_ops_cases.yml b/.buildkite/pipelines/pull_request/response_ops_cases.yml index 1e1510260436d..f49831d730e83 100644 --- a/.buildkite/pipelines/pull_request/response_ops_cases.yml +++ b/.buildkite/pipelines/pull_request/response_ops_cases.yml @@ -7,6 +7,7 @@ steps: depends_on: - build - quick_checks + - linting timeout_in_minutes: 120 retry: automatic: diff --git a/.buildkite/pipelines/pull_request/security_solution/ai_assistant.yml b/.buildkite/pipelines/pull_request/security_solution/ai_assistant.yml index 252365ee7e4da..e578dae49c3b2 100644 --- a/.buildkite/pipelines/pull_request/security_solution/ai_assistant.yml +++ b/.buildkite/pipelines/pull_request/security_solution/ai_assistant.yml @@ -7,6 +7,7 @@ steps: depends_on: - build - quick_checks + - linting timeout_in_minutes: 60 parallelism: 1 retry: @@ -22,6 +23,7 @@ steps: depends_on: - build - quick_checks + - linting timeout_in_minutes: 60 parallelism: 1 retry: diff --git a/.buildkite/pipelines/pull_request/security_solution/cloud_security_posture.yml b/.buildkite/pipelines/pull_request/security_solution/cloud_security_posture.yml index 7f5131b77f204..3b190f0e0d225 100644 --- a/.buildkite/pipelines/pull_request/security_solution/cloud_security_posture.yml +++ b/.buildkite/pipelines/pull_request/security_solution/cloud_security_posture.yml @@ -7,6 +7,7 @@ steps: depends_on: - build - quick_checks + - linting timeout_in_minutes: 60 parallelism: 1 retry: @@ -22,6 +23,7 @@ steps: depends_on: - build - quick_checks + - linting timeout_in_minutes: 60 parallelism: 1 retry: diff --git a/.buildkite/pipelines/pull_request/security_solution/cypress_burn.yml b/.buildkite/pipelines/pull_request/security_solution/cypress_burn.yml index 6d69748c6d447..26138974a19de 100644 --- a/.buildkite/pipelines/pull_request/security_solution/cypress_burn.yml +++ b/.buildkite/pipelines/pull_request/security_solution/cypress_burn.yml @@ -9,6 +9,7 @@ steps: depends_on: - build - quick_checks + - linting timeout_in_minutes: 60 soft_fail: true parallelism: 1 @@ -25,6 +26,7 @@ steps: depends_on: - build - quick_checks + - linting timeout_in_minutes: 60 soft_fail: true parallelism: 1 @@ -39,6 +41,7 @@ steps: depends_on: - build - quick_checks + - linting timeout_in_minutes: 60 parallelism: 1 retry: @@ -53,6 +56,7 @@ steps: depends_on: - build - quick_checks + - linting timeout_in_minutes: 50 soft_fail: true retry: diff --git a/.buildkite/pipelines/pull_request/security_solution/defend_workflows.yml b/.buildkite/pipelines/pull_request/security_solution/defend_workflows.yml index 47f0e672a8d5a..683ef463e8f63 100644 --- a/.buildkite/pipelines/pull_request/security_solution/defend_workflows.yml +++ b/.buildkite/pipelines/pull_request/security_solution/defend_workflows.yml @@ -9,6 +9,7 @@ steps: depends_on: - build - quick_checks + - linting timeout_in_minutes: 60 parallelism: 20 retry: @@ -26,6 +27,7 @@ steps: depends_on: - build - quick_checks + - linting timeout_in_minutes: 60 parallelism: 14 retry: diff --git a/.buildkite/pipelines/pull_request/security_solution/detection_engine.yml b/.buildkite/pipelines/pull_request/security_solution/detection_engine.yml index 65a9dc832e1e6..5142ca7d484b7 100644 --- a/.buildkite/pipelines/pull_request/security_solution/detection_engine.yml +++ b/.buildkite/pipelines/pull_request/security_solution/detection_engine.yml @@ -7,6 +7,7 @@ steps: depends_on: - build - quick_checks + - linting timeout_in_minutes: 60 parallelism: 5 retry: @@ -22,6 +23,7 @@ steps: depends_on: - build - quick_checks + - linting timeout_in_minutes: 60 parallelism: 2 retry: @@ -37,6 +39,7 @@ steps: depends_on: - build - quick_checks + - linting timeout_in_minutes: 60 parallelism: 5 retry: @@ -52,6 +55,7 @@ steps: depends_on: - build - quick_checks + - linting timeout_in_minutes: 60 parallelism: 2 retry: diff --git a/.buildkite/pipelines/pull_request/security_solution/entity_analytics.yml b/.buildkite/pipelines/pull_request/security_solution/entity_analytics.yml index 8883f1ab9c038..40b4116c925c9 100644 --- a/.buildkite/pipelines/pull_request/security_solution/entity_analytics.yml +++ b/.buildkite/pipelines/pull_request/security_solution/entity_analytics.yml @@ -7,6 +7,7 @@ steps: depends_on: - build - quick_checks + - linting timeout_in_minutes: 60 parallelism: 3 retry: @@ -22,6 +23,7 @@ steps: depends_on: - build - quick_checks + - linting timeout_in_minutes: 60 parallelism: 2 retry: diff --git a/.buildkite/pipelines/pull_request/security_solution/explore.yml b/.buildkite/pipelines/pull_request/security_solution/explore.yml index 239021affcf99..fe076dbfe80e9 100644 --- a/.buildkite/pipelines/pull_request/security_solution/explore.yml +++ b/.buildkite/pipelines/pull_request/security_solution/explore.yml @@ -7,6 +7,7 @@ steps: depends_on: - build - quick_checks + - linting timeout_in_minutes: 60 parallelism: 2 retry: @@ -22,6 +23,7 @@ steps: depends_on: - build - quick_checks + - linting timeout_in_minutes: 60 parallelism: 2 retry: diff --git a/.buildkite/pipelines/pull_request/security_solution/investigations.yml b/.buildkite/pipelines/pull_request/security_solution/investigations.yml index ccd469aedbdbe..e0270bb72d573 100644 --- a/.buildkite/pipelines/pull_request/security_solution/investigations.yml +++ b/.buildkite/pipelines/pull_request/security_solution/investigations.yml @@ -7,6 +7,7 @@ steps: depends_on: - build - quick_checks + - linting timeout_in_minutes: 60 parallelism: 7 retry: @@ -22,6 +23,7 @@ steps: depends_on: - build - quick_checks + - linting timeout_in_minutes: 60 parallelism: 8 retry: diff --git a/.buildkite/pipelines/pull_request/security_solution/osquery_cypress.yml b/.buildkite/pipelines/pull_request/security_solution/osquery_cypress.yml index 26faa344371c9..18f4022564d21 100644 --- a/.buildkite/pipelines/pull_request/security_solution/osquery_cypress.yml +++ b/.buildkite/pipelines/pull_request/security_solution/osquery_cypress.yml @@ -7,6 +7,7 @@ steps: depends_on: - build - quick_checks + - linting timeout_in_minutes: 60 parallelism: 8 retry: @@ -22,6 +23,7 @@ steps: depends_on: - build - quick_checks + - linting timeout_in_minutes: 60 parallelism: 8 retry: diff --git a/.buildkite/pipelines/pull_request/security_solution/playwright.yml b/.buildkite/pipelines/pull_request/security_solution/playwright.yml index 694a7ed588089..9eb84f82afced 100644 --- a/.buildkite/pipelines/pull_request/security_solution/playwright.yml +++ b/.buildkite/pipelines/pull_request/security_solution/playwright.yml @@ -7,6 +7,7 @@ steps: depends_on: - build - quick_checks + - linting timeout_in_minutes: 60 parallelism: 1 retry: @@ -22,6 +23,7 @@ steps: depends_on: - build - quick_checks + - linting timeout_in_minutes: 60 parallelism: 1 retry: diff --git a/.buildkite/pipelines/pull_request/security_solution/rule_management.yml b/.buildkite/pipelines/pull_request/security_solution/rule_management.yml index 30bd1bd1ff649..d06e4f28b6b20 100644 --- a/.buildkite/pipelines/pull_request/security_solution/rule_management.yml +++ b/.buildkite/pipelines/pull_request/security_solution/rule_management.yml @@ -7,6 +7,7 @@ steps: depends_on: - build - quick_checks + - linting timeout_in_minutes: 60 parallelism: 5 retry: @@ -22,6 +23,7 @@ steps: depends_on: - build - quick_checks + - linting timeout_in_minutes: 60 parallelism: 1 retry: @@ -37,6 +39,7 @@ steps: depends_on: - build - quick_checks + - linting timeout_in_minutes: 60 parallelism: 4 retry: @@ -52,6 +55,7 @@ steps: depends_on: - build - quick_checks + - linting timeout_in_minutes: 60 parallelism: 2 retry: diff --git a/.buildkite/pipelines/pull_request/slo_plugin_e2e.yml b/.buildkite/pipelines/pull_request/slo_plugin_e2e.yml index 852ec2f9a0b16..56154f50726b7 100644 --- a/.buildkite/pipelines/pull_request/slo_plugin_e2e.yml +++ b/.buildkite/pipelines/pull_request/slo_plugin_e2e.yml @@ -7,6 +7,7 @@ steps: depends_on: - build - quick_checks + - linting timeout_in_minutes: 30 artifact_paths: - 'x-pack/plugins/observability_solution/slo/e2e/.journeys/**/*' diff --git a/.buildkite/pipelines/pull_request/synthetics_plugin.yml b/.buildkite/pipelines/pull_request/synthetics_plugin.yml index 77f330b991ba8..e0de87d8a3037 100644 --- a/.buildkite/pipelines/pull_request/synthetics_plugin.yml +++ b/.buildkite/pipelines/pull_request/synthetics_plugin.yml @@ -7,6 +7,7 @@ steps: depends_on: - build - quick_checks + - linting timeout_in_minutes: 60 artifact_paths: - 'x-pack/plugins/observability_solution/synthetics/e2e/.journeys/**/*' diff --git a/.buildkite/pipelines/pull_request/uptime_plugin.yml b/.buildkite/pipelines/pull_request/uptime_plugin.yml index 286c760336132..0861dfae9b7b1 100644 --- a/.buildkite/pipelines/pull_request/uptime_plugin.yml +++ b/.buildkite/pipelines/pull_request/uptime_plugin.yml @@ -7,6 +7,7 @@ steps: depends_on: - build - quick_checks + - linting timeout_in_minutes: 60 artifact_paths: - 'x-pack/plugins/observability_solution/synthetics/e2e/.journeys/**/*' diff --git a/.buildkite/pipelines/pull_request/ux_plugin_e2e.yml b/.buildkite/pipelines/pull_request/ux_plugin_e2e.yml index a11309cffb2c2..e94cca72b221d 100644 --- a/.buildkite/pipelines/pull_request/ux_plugin_e2e.yml +++ b/.buildkite/pipelines/pull_request/ux_plugin_e2e.yml @@ -7,6 +7,7 @@ steps: depends_on: - build - quick_checks + - linting timeout_in_minutes: 60 artifact_paths: - 'x-pack/plugins/observability_solution/ux/e2e/.journeys/**/*' diff --git a/.buildkite/scripts/steps/checks/quick_checks.txt b/.buildkite/scripts/steps/checks/quick_checks.txt index e0196950b4a75..9bd9224673905 100644 --- a/.buildkite/scripts/steps/checks/quick_checks.txt +++ b/.buildkite/scripts/steps/checks/quick_checks.txt @@ -1,4 +1,3 @@ -.buildkite/scripts/steps/checks/precommit_hook.sh .buildkite/scripts/steps/checks/ts_projects.sh .buildkite/scripts/steps/checks/packages.sh .buildkite/scripts/steps/checks/bazel_packages.sh diff --git a/.buildkite/scripts/steps/lint.sh b/.buildkite/scripts/steps/lint.sh index 05eb3bb602d84..490c83a1c2d02 100755 --- a/.buildkite/scripts/steps/lint.sh +++ b/.buildkite/scripts/steps/lint.sh @@ -15,9 +15,9 @@ echo '--- Lint: eslint' # after possibly commiting fixed files to the repo set +e; if is_pr && ! is_auto_commit_disabled; then - git ls-files | grep -E '\.(js|mjs|ts|tsx)$' | xargs -n 250 -P 4 node scripts/eslint --no-cache --fix + git ls-files | grep -E '\.(js|mjs|ts|tsx)$' | xargs -n 250 -P 16 node scripts/eslint --no-cache --fix else - git ls-files | grep -E '\.(js|mjs|ts|tsx)$' | xargs -n 250 -P 4 node scripts/eslint --no-cache + git ls-files | grep -E '\.(js|mjs|ts|tsx)$' | xargs -n 250 -P 16 node scripts/eslint --no-cache fi eslint_exit=$?