From 23b8bef0731083840e68a9893a2e0574824d51a3 Mon Sep 17 00:00:00 2001 From: Jon Date: Mon, 28 Oct 2024 12:24:00 -0500 Subject: [PATCH] [ci] Run linting before tests (#197310) Linting is a frequent source of build failures. By increasing the cpu count we can run this check before starting our highly-parallel tests without impacting total build time. --- .buildkite/pipelines/on_merge.yml | 102 ++++++++++++------ .../pipelines/pull_request/apm_cypress.yml | 2 + .buildkite/pipelines/pull_request/base.yml | 48 ++++----- .../pipelines/pull_request/deploy_cloud.yml | 2 + .../pull_request/exploratory_view_plugin.yml | 2 + .buildkite/pipelines/pull_request/fips.yml | 2 + .../pipelines/pull_request/fleet_cypress.yml | 2 + .../pull_request/inventory_cypress.yml | 2 + .../pipelines/pull_request/kbn_handlebars.yml | 2 + .../observability_onboarding_cypress.yml | 2 + .../pull_request/profiling_cypress.yml | 2 + .../pipelines/pull_request/response_ops.yml | 2 + .../pull_request/response_ops_cases.yml | 2 + .../security_solution/ai_assistant.yml | 4 + .../cloud_security_posture.yml | 4 + .../security_solution/cypress_burn.yml | 8 ++ .../security_solution/defend_workflows.yml | 4 + .../security_solution/detection_engine.yml | 8 ++ .../security_solution/entity_analytics.yml | 4 + .../security_solution/explore.yml | 4 + .../security_solution/investigations.yml | 4 + .../security_solution/osquery_cypress.yml | 4 + .../security_solution/playwright.yml | 4 + .../security_solution/rule_management.yml | 8 ++ .../pipelines/pull_request/slo_plugin_e2e.yml | 2 + .../pull_request/synthetics_plugin.yml | 2 + .../pipelines/pull_request/uptime_plugin.yml | 2 + .../pipelines/pull_request/ux_plugin_e2e.yml | 2 + .../scripts/steps/checks/quick_checks.txt | 1 - .buildkite/scripts/steps/lint.sh | 4 +- 30 files changed, 184 insertions(+), 57 deletions(-) diff --git a/.buildkite/pipelines/on_merge.yml b/.buildkite/pipelines/on_merge.yml index 64067ec52a4d3..c6900ccfe9c41 100644 --- a/.buildkite/pipelines/on_merge.yml +++ b/.buildkite/pipelines/on_merge.yml @@ -46,6 +46,36 @@ 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 + + - command: .buildkite/scripts/steps/lint_with_types.sh + label: 'Linting (with types)' + agents: + image: family/kibana-ubuntu-2004 + imageProject: elastic-images-prod + provider: gcp + machineType: n2-standard-32 + preemptible: true + key: linting_with_types + timeout_in_minutes: 90 + retry: + automatic: + - exit_status: '-1' + limit: 3 + - wait - command: .buildkite/scripts/steps/on_merge_api_docs.sh @@ -109,6 +139,8 @@ steps: depends_on: - build - quick_checks + - linting + - linting_with_types timeout_in_minutes: 60 parallelism: 3 retry: @@ -127,6 +159,8 @@ steps: depends_on: - build - quick_checks + - linting + - linting_with_types timeout_in_minutes: 60 parallelism: 2 retry: @@ -145,6 +179,8 @@ steps: depends_on: - build - quick_checks + - linting + - linting_with_types timeout_in_minutes: 60 parallelism: 8 retry: @@ -163,6 +199,8 @@ steps: depends_on: - build - quick_checks + - linting + - linting_with_types timeout_in_minutes: 60 parallelism: 5 retry: @@ -181,6 +219,8 @@ steps: depends_on: - build - quick_checks + - linting + - linting_with_types timeout_in_minutes: 60 parallelism: 1 retry: @@ -199,6 +239,8 @@ steps: depends_on: - build - quick_checks + - linting + - linting_with_types timeout_in_minutes: 60 parallelism: 4 retry: @@ -217,6 +259,8 @@ steps: depends_on: - build - quick_checks + - linting + - linting_with_types timeout_in_minutes: 60 parallelism: 6 retry: @@ -235,6 +279,8 @@ steps: depends_on: - build - quick_checks + - linting + - linting_with_types timeout_in_minutes: 60 parallelism: 5 retry: @@ -253,6 +299,8 @@ steps: depends_on: - build - quick_checks + - linting + - linting_with_types timeout_in_minutes: 60 parallelism: 6 retry: @@ -271,6 +319,8 @@ steps: depends_on: - build - quick_checks + - linting + - linting_with_types timeout_in_minutes: 60 parallelism: 5 retry: @@ -289,6 +339,8 @@ steps: depends_on: - build - quick_checks + - linting + - linting_with_types timeout_in_minutes: 60 parallelism: 6 retry: @@ -307,6 +359,8 @@ steps: depends_on: - build - quick_checks + - linting + - linting_with_types timeout_in_minutes: 60 parallelism: 1 retry: @@ -325,6 +379,8 @@ steps: depends_on: - build - quick_checks + - linting + - linting_with_types timeout_in_minutes: 60 parallelism: 1 retry: @@ -343,6 +399,8 @@ steps: depends_on: - build - quick_checks + - linting + - linting_with_types timeout_in_minutes: 60 parallelism: 2 retry: @@ -361,6 +419,8 @@ steps: depends_on: - build - quick_checks + - linting + - linting_with_types timeout_in_minutes: 60 parallelism: 2 retry: @@ -379,6 +439,8 @@ steps: depends_on: - build - quick_checks + - linting + - linting_with_types timeout_in_minutes: 60 parallelism: 6 retry: @@ -397,6 +459,8 @@ steps: depends_on: - build - quick_checks + - linting + - linting_with_types timeout_in_minutes: 60 parallelism: 8 retry: @@ -415,6 +479,8 @@ steps: depends_on: - build - quick_checks + - linting + - linting_with_types timeout_in_minutes: 60 parallelism: 8 retry: @@ -435,6 +501,8 @@ steps: depends_on: - build - quick_checks + - linting + - linting_with_types timeout_in_minutes: 60 parallelism: 20 retry: @@ -455,6 +523,8 @@ steps: depends_on: - build - quick_checks + - linting + - linting_with_types timeout_in_minutes: 60 parallelism: 14 retry: @@ -468,42 +538,14 @@ steps: depends_on: - build - quick_checks + - linting + - linting_with_types 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: - image: family/kibana-ubuntu-2004 - imageProject: elastic-images-prod - provider: gcp - machineType: n2-standard-16 - preemptible: true - key: linting_with_types - timeout_in_minutes: 90 - retry: - automatic: - - exit_status: '-1' - limit: 3 - - command: .buildkite/scripts/steps/checks.sh label: 'Checks' agents: diff --git a/.buildkite/pipelines/pull_request/apm_cypress.yml b/.buildkite/pipelines/pull_request/apm_cypress.yml index 05194bae83e79..9d2cca6d9d452 100644 --- a/.buildkite/pipelines/pull_request/apm_cypress.yml +++ b/.buildkite/pipelines/pull_request/apm_cypress.yml @@ -7,6 +7,8 @@ steps: depends_on: - build - quick_checks + - linting + - linting_with_types 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..fdc80e6cb8595 100644 --- a/.buildkite/pipelines/pull_request/base.yml +++ b/.buildkite/pipelines/pull_request/base.yml @@ -32,6 +32,30 @@ 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 + + - command: .buildkite/scripts/steps/lint_with_types.sh + label: 'Linting (with types)' + agents: + machineType: n2-standard-32 + preemptible: true + key: linting_with_types + timeout_in_minutes: 90 + retry: + automatic: + - exit_status: '-1' + limit: 3 + - wait - command: .buildkite/scripts/steps/ci_stats_ready.sh @@ -61,18 +85,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: @@ -85,18 +97,6 @@ steps: - exit_status: '-1' limit: 3 - - command: .buildkite/scripts/steps/lint_with_types.sh - label: 'Linting (with types)' - agents: - machineType: n2-standard-16 - preemptible: true - key: linting_with_types - timeout_in_minutes: 90 - retry: - automatic: - - exit_status: '-1' - limit: 3 - - command: .buildkite/scripts/steps/checks.sh label: 'Checks' key: checks diff --git a/.buildkite/pipelines/pull_request/deploy_cloud.yml b/.buildkite/pipelines/pull_request/deploy_cloud.yml index d520822e54f7b..e82d1ef2e494c 100644 --- a/.buildkite/pipelines/pull_request/deploy_cloud.yml +++ b/.buildkite/pipelines/pull_request/deploy_cloud.yml @@ -7,6 +7,8 @@ steps: depends_on: - build - quick_checks + - linting + - linting_with_types 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..42aaf59b1c1f2 100644 --- a/.buildkite/pipelines/pull_request/exploratory_view_plugin.yml +++ b/.buildkite/pipelines/pull_request/exploratory_view_plugin.yml @@ -7,6 +7,8 @@ steps: depends_on: - build - quick_checks + - linting + - linting_with_types 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..3fa0ed9bd2062 100644 --- a/.buildkite/pipelines/pull_request/fips.yml +++ b/.buildkite/pipelines/pull_request/fips.yml @@ -7,6 +7,8 @@ steps: depends_on: - build - quick_checks + - linting + - linting_with_types 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..071106209caaa 100644 --- a/.buildkite/pipelines/pull_request/fleet_cypress.yml +++ b/.buildkite/pipelines/pull_request/fleet_cypress.yml @@ -7,6 +7,8 @@ steps: depends_on: - build - quick_checks + - linting + - linting_with_types 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..b1a8b999f09f2 100644 --- a/.buildkite/pipelines/pull_request/inventory_cypress.yml +++ b/.buildkite/pipelines/pull_request/inventory_cypress.yml @@ -7,6 +7,8 @@ steps: depends_on: - build - quick_checks + - linting + - linting_with_types 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..ad338ec425a04 100644 --- a/.buildkite/pipelines/pull_request/kbn_handlebars.yml +++ b/.buildkite/pipelines/pull_request/kbn_handlebars.yml @@ -7,6 +7,8 @@ steps: depends_on: - build - quick_checks + - linting + - linting_with_types 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..d0afe1cd138da 100644 --- a/.buildkite/pipelines/pull_request/observability_onboarding_cypress.yml +++ b/.buildkite/pipelines/pull_request/observability_onboarding_cypress.yml @@ -7,6 +7,8 @@ steps: depends_on: - build - quick_checks + - linting + - linting_with_types 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..2b86cffe75fa6 100644 --- a/.buildkite/pipelines/pull_request/profiling_cypress.yml +++ b/.buildkite/pipelines/pull_request/profiling_cypress.yml @@ -7,6 +7,8 @@ steps: depends_on: - build - quick_checks + - linting + - linting_with_types 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..a5c9b27ee7ecf 100644 --- a/.buildkite/pipelines/pull_request/response_ops.yml +++ b/.buildkite/pipelines/pull_request/response_ops.yml @@ -7,6 +7,8 @@ steps: depends_on: - build - quick_checks + - linting + - linting_with_types 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..994fbb6c4963a 100644 --- a/.buildkite/pipelines/pull_request/response_ops_cases.yml +++ b/.buildkite/pipelines/pull_request/response_ops_cases.yml @@ -7,6 +7,8 @@ steps: depends_on: - build - quick_checks + - linting + - linting_with_types 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..7f9a8d9da06e6 100644 --- a/.buildkite/pipelines/pull_request/security_solution/ai_assistant.yml +++ b/.buildkite/pipelines/pull_request/security_solution/ai_assistant.yml @@ -7,6 +7,8 @@ steps: depends_on: - build - quick_checks + - linting + - linting_with_types timeout_in_minutes: 60 parallelism: 1 retry: @@ -22,6 +24,8 @@ steps: depends_on: - build - quick_checks + - linting + - linting_with_types 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..93fad6eecf167 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,8 @@ steps: depends_on: - build - quick_checks + - linting + - linting_with_types timeout_in_minutes: 60 parallelism: 1 retry: @@ -22,6 +24,8 @@ steps: depends_on: - build - quick_checks + - linting + - linting_with_types 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..767f9d2c4745a 100644 --- a/.buildkite/pipelines/pull_request/security_solution/cypress_burn.yml +++ b/.buildkite/pipelines/pull_request/security_solution/cypress_burn.yml @@ -9,6 +9,8 @@ steps: depends_on: - build - quick_checks + - linting + - linting_with_types timeout_in_minutes: 60 soft_fail: true parallelism: 1 @@ -25,6 +27,8 @@ steps: depends_on: - build - quick_checks + - linting + - linting_with_types timeout_in_minutes: 60 soft_fail: true parallelism: 1 @@ -39,6 +43,8 @@ steps: depends_on: - build - quick_checks + - linting + - linting_with_types timeout_in_minutes: 60 parallelism: 1 retry: @@ -53,6 +59,8 @@ steps: depends_on: - build - quick_checks + - linting + - linting_with_types 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 fc5e601adad61..9c3bb0e90a83a 100644 --- a/.buildkite/pipelines/pull_request/security_solution/defend_workflows.yml +++ b/.buildkite/pipelines/pull_request/security_solution/defend_workflows.yml @@ -9,6 +9,8 @@ steps: depends_on: - build - quick_checks + - linting + - linting_with_types timeout_in_minutes: 60 parallelism: 20 retry: @@ -26,6 +28,8 @@ steps: depends_on: - build - quick_checks + - linting + - linting_with_types 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..34437d4136222 100644 --- a/.buildkite/pipelines/pull_request/security_solution/detection_engine.yml +++ b/.buildkite/pipelines/pull_request/security_solution/detection_engine.yml @@ -7,6 +7,8 @@ steps: depends_on: - build - quick_checks + - linting + - linting_with_types timeout_in_minutes: 60 parallelism: 5 retry: @@ -22,6 +24,8 @@ steps: depends_on: - build - quick_checks + - linting + - linting_with_types timeout_in_minutes: 60 parallelism: 2 retry: @@ -37,6 +41,8 @@ steps: depends_on: - build - quick_checks + - linting + - linting_with_types timeout_in_minutes: 60 parallelism: 5 retry: @@ -52,6 +58,8 @@ steps: depends_on: - build - quick_checks + - linting + - linting_with_types 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..bea72bf851345 100644 --- a/.buildkite/pipelines/pull_request/security_solution/entity_analytics.yml +++ b/.buildkite/pipelines/pull_request/security_solution/entity_analytics.yml @@ -7,6 +7,8 @@ steps: depends_on: - build - quick_checks + - linting + - linting_with_types timeout_in_minutes: 60 parallelism: 3 retry: @@ -22,6 +24,8 @@ steps: depends_on: - build - quick_checks + - linting + - linting_with_types 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..a3578c911c1cf 100644 --- a/.buildkite/pipelines/pull_request/security_solution/explore.yml +++ b/.buildkite/pipelines/pull_request/security_solution/explore.yml @@ -7,6 +7,8 @@ steps: depends_on: - build - quick_checks + - linting + - linting_with_types timeout_in_minutes: 60 parallelism: 2 retry: @@ -22,6 +24,8 @@ steps: depends_on: - build - quick_checks + - linting + - linting_with_types 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..3b7fc869b4703 100644 --- a/.buildkite/pipelines/pull_request/security_solution/investigations.yml +++ b/.buildkite/pipelines/pull_request/security_solution/investigations.yml @@ -7,6 +7,8 @@ steps: depends_on: - build - quick_checks + - linting + - linting_with_types timeout_in_minutes: 60 parallelism: 7 retry: @@ -22,6 +24,8 @@ steps: depends_on: - build - quick_checks + - linting + - linting_with_types 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 5fa8fe359ada6..e0b0278e3d969 100644 --- a/.buildkite/pipelines/pull_request/security_solution/osquery_cypress.yml +++ b/.buildkite/pipelines/pull_request/security_solution/osquery_cypress.yml @@ -7,6 +7,8 @@ steps: depends_on: - build - quick_checks + - linting + - linting_with_types timeout_in_minutes: 60 parallelism: 8 retry: @@ -22,6 +24,8 @@ steps: depends_on: - build - quick_checks + - linting + - linting_with_types 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..2efa342a5ce37 100644 --- a/.buildkite/pipelines/pull_request/security_solution/playwright.yml +++ b/.buildkite/pipelines/pull_request/security_solution/playwright.yml @@ -7,6 +7,8 @@ steps: depends_on: - build - quick_checks + - linting + - linting_with_types timeout_in_minutes: 60 parallelism: 1 retry: @@ -22,6 +24,8 @@ steps: depends_on: - build - quick_checks + - linting + - linting_with_types 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..aee037704d332 100644 --- a/.buildkite/pipelines/pull_request/security_solution/rule_management.yml +++ b/.buildkite/pipelines/pull_request/security_solution/rule_management.yml @@ -7,6 +7,8 @@ steps: depends_on: - build - quick_checks + - linting + - linting_with_types timeout_in_minutes: 60 parallelism: 5 retry: @@ -22,6 +24,8 @@ steps: depends_on: - build - quick_checks + - linting + - linting_with_types timeout_in_minutes: 60 parallelism: 1 retry: @@ -37,6 +41,8 @@ steps: depends_on: - build - quick_checks + - linting + - linting_with_types timeout_in_minutes: 60 parallelism: 4 retry: @@ -52,6 +58,8 @@ steps: depends_on: - build - quick_checks + - linting + - linting_with_types 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..025c80809ab35 100644 --- a/.buildkite/pipelines/pull_request/slo_plugin_e2e.yml +++ b/.buildkite/pipelines/pull_request/slo_plugin_e2e.yml @@ -7,6 +7,8 @@ steps: depends_on: - build - quick_checks + - linting + - linting_with_types 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..0707650aa7c01 100644 --- a/.buildkite/pipelines/pull_request/synthetics_plugin.yml +++ b/.buildkite/pipelines/pull_request/synthetics_plugin.yml @@ -7,6 +7,8 @@ steps: depends_on: - build - quick_checks + - linting + - linting_with_types 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..33a529739ae6f 100644 --- a/.buildkite/pipelines/pull_request/uptime_plugin.yml +++ b/.buildkite/pipelines/pull_request/uptime_plugin.yml @@ -7,6 +7,8 @@ steps: depends_on: - build - quick_checks + - linting + - linting_with_types 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..977701cc99485 100644 --- a/.buildkite/pipelines/pull_request/ux_plugin_e2e.yml +++ b/.buildkite/pipelines/pull_request/ux_plugin_e2e.yml @@ -7,6 +7,8 @@ steps: depends_on: - build - quick_checks + - linting + - linting_with_types 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..70ab323c9f731 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 8 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 8 node scripts/eslint --no-cache fi eslint_exit=$?