From 9b92adf90f57a12be80b0e160de77f439a752e62 Mon Sep 17 00:00:00 2001 From: Jon Date: Tue, 5 Nov 2024 12:21:27 -0600 Subject: [PATCH] [8.16][ci] Run checks before tests (#198452) (#198850) #198452 --- .buildkite/pipelines/on_merge.yml | 56 +++++++++---------- .../pipelines/pull_request/apm_cypress.yml | 2 + .buildkite/pipelines/pull_request/base.yml | 47 ++++++++-------- .../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 + .../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 | 2 + .../cloud_security_posture.yml | 4 ++ .../security_solution/cypress_burn.yml | 6 ++ .../security_solution/defend_workflows.yml | 2 + .../security_solution/detection_engine.yml | 4 ++ .../security_solution/entity_analytics.yml | 2 + .../security_solution/explore.yml | 2 + .../security_solution/investigations.yml | 3 +- .../security_solution/osquery_cypress.yml | 2 + .../security_solution/playwright.yml | 2 + .../security_solution/rule_management.yml | 4 ++ .../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 + 27 files changed, 112 insertions(+), 52 deletions(-) diff --git a/.buildkite/pipelines/on_merge.yml b/.buildkite/pipelines/on_merge.yml index 48c387def29b6..a7825e01a3b22 100644 --- a/.buildkite/pipelines/on_merge.yml +++ b/.buildkite/pipelines/on_merge.yml @@ -45,6 +45,20 @@ steps: - exit_status: '-1' limit: 3 + - command: .buildkite/scripts/steps/checks.sh + label: 'Checks' + agents: + image: family/kibana-ubuntu-2004 + imageProject: elastic-images-prod + provider: gcp + machineType: n2-standard-2 + preemptible: true + timeout_in_minutes: 60 + retry: + automatic: + - exit_status: '-1' + limit: 3 + - command: .buildkite/scripts/steps/lint.sh label: 'Linting' agents: @@ -89,6 +103,20 @@ steps: - exit_status: '-1' limit: 3 + - command: .buildkite/scripts/steps/checks/capture_oas_snapshot.sh + label: 'Check OAS Snapshot' + agents: + image: family/kibana-ubuntu-2004 + imageProject: elastic-images-prod + provider: gcp + machineType: n2-standard-4 + preemptible: true + timeout_in_minutes: 60 + retry: + automatic: + - exit_status: '-1' + limit: 3 + - wait - command: .buildkite/scripts/steps/on_merge_api_docs.sh @@ -315,34 +343,6 @@ steps: provider: gcp machineType: n2-standard-2 - - command: .buildkite/scripts/steps/checks.sh - label: 'Checks' - agents: - image: family/kibana-ubuntu-2004 - imageProject: elastic-images-prod - provider: gcp - machineType: n2-standard-2 - preemptible: true - timeout_in_minutes: 60 - retry: - automatic: - - exit_status: '-1' - limit: 3 - - - command: .buildkite/scripts/steps/checks/capture_oas_snapshot.sh - label: 'Check OAS Snapshot' - agents: - image: family/kibana-ubuntu-2004 - imageProject: elastic-images-prod - provider: gcp - machineType: n2-standard-2 - preemptible: true - timeout_in_minutes: 60 - retry: - automatic: - - exit_status: '-1' - limit: 3 - - command: .buildkite/scripts/steps/storybooks/build_and_upload.sh label: 'Build Storybooks' agents: diff --git a/.buildkite/pipelines/pull_request/apm_cypress.yml b/.buildkite/pipelines/pull_request/apm_cypress.yml index c0cb60dbc986b..97935cc3489d1 100644 --- a/.buildkite/pipelines/pull_request/apm_cypress.yml +++ b/.buildkite/pipelines/pull_request/apm_cypress.yml @@ -7,9 +7,11 @@ steps: depends_on: - build - quick_checks + - checks - linting - linting_with_types - check_types + - check_oas_snapshot 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 54840cb43c65f..e7b593f464b54 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/checks.sh + label: 'Checks' + key: checks + agents: + machineType: n2-standard-2 + preemptible: true + timeout_in_minutes: 60 + retry: + automatic: + - exit_status: '-1' + limit: 3 + - command: .buildkite/scripts/steps/lint.sh label: 'Linting' agents: @@ -56,6 +68,18 @@ steps: - exit_status: '-1' limit: 3 + - command: .buildkite/scripts/steps/checks/capture_oas_snapshot.sh + label: 'Check OAS Snapshot' + agents: + machineType: n2-standard-4 + preemptible: true + key: check_oas_snapshot + timeout_in_minutes: 60 + retry: + automatic: + - exit_status: '-1' + limit: 3 + - command: .buildkite/scripts/steps/check_types.sh label: 'Check Types' agents: @@ -99,29 +123,6 @@ steps: - exit_status: '*' limit: 1 - - command: .buildkite/scripts/steps/checks.sh - label: 'Checks' - key: checks - agents: - machineType: n2-standard-2 - preemptible: true - timeout_in_minutes: 60 - retry: - automatic: - - exit_status: '-1' - limit: 3 - - - command: .buildkite/scripts/steps/checks/capture_oas_snapshot.sh - label: 'Check OAS Snapshot' - agents: - machineType: n2-standard-2 - preemptible: true - timeout_in_minutes: 60 - retry: - automatic: - - exit_status: '-1' - limit: 3 - - command: .buildkite/scripts/steps/api_docs/build_api_docs.sh label: 'Build API Docs' agents: diff --git a/.buildkite/pipelines/pull_request/deploy_cloud.yml b/.buildkite/pipelines/pull_request/deploy_cloud.yml index 6b42037b95953..565c5af3bb0c1 100644 --- a/.buildkite/pipelines/pull_request/deploy_cloud.yml +++ b/.buildkite/pipelines/pull_request/deploy_cloud.yml @@ -7,9 +7,11 @@ steps: depends_on: - build - quick_checks + - checks - linting - linting_with_types - check_types + - check_oas_snapshot 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 c46edb528987a..05fc218080cd4 100644 --- a/.buildkite/pipelines/pull_request/exploratory_view_plugin.yml +++ b/.buildkite/pipelines/pull_request/exploratory_view_plugin.yml @@ -7,9 +7,11 @@ steps: depends_on: - build - quick_checks + - checks - linting - linting_with_types - check_types + - check_oas_snapshot 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 1a759e1288328..4f906e4420c8f 100644 --- a/.buildkite/pipelines/pull_request/fips.yml +++ b/.buildkite/pipelines/pull_request/fips.yml @@ -7,9 +7,11 @@ steps: depends_on: - build - quick_checks + - checks - linting - linting_with_types - check_types + - check_oas_snapshot 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 d20591728b788..50912cc16e5a8 100644 --- a/.buildkite/pipelines/pull_request/fleet_cypress.yml +++ b/.buildkite/pipelines/pull_request/fleet_cypress.yml @@ -7,9 +7,11 @@ steps: depends_on: - build - quick_checks + - checks - linting - linting_with_types - check_types + - check_oas_snapshot timeout_in_minutes: 50 parallelism: 6 retry: diff --git a/.buildkite/pipelines/pull_request/kbn_handlebars.yml b/.buildkite/pipelines/pull_request/kbn_handlebars.yml index 36901a5d5c552..187058d238682 100644 --- a/.buildkite/pipelines/pull_request/kbn_handlebars.yml +++ b/.buildkite/pipelines/pull_request/kbn_handlebars.yml @@ -7,9 +7,11 @@ steps: depends_on: - build - quick_checks + - checks - linting - linting_with_types - check_types + - check_oas_snapshot 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 8906cc72fa81f..b0d438064d51e 100644 --- a/.buildkite/pipelines/pull_request/observability_onboarding_cypress.yml +++ b/.buildkite/pipelines/pull_request/observability_onboarding_cypress.yml @@ -7,9 +7,11 @@ steps: depends_on: - build - quick_checks + - checks - linting - linting_with_types - check_types + - check_oas_snapshot 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 100e42206b3a1..8ed98a4fbc736 100644 --- a/.buildkite/pipelines/pull_request/profiling_cypress.yml +++ b/.buildkite/pipelines/pull_request/profiling_cypress.yml @@ -7,9 +7,11 @@ steps: depends_on: - build - quick_checks + - checks - linting - linting_with_types - check_types + - check_oas_snapshot 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 f09beb168259f..9ac20e86f6660 100644 --- a/.buildkite/pipelines/pull_request/response_ops.yml +++ b/.buildkite/pipelines/pull_request/response_ops.yml @@ -7,9 +7,11 @@ steps: depends_on: - build - quick_checks + - checks - linting - linting_with_types - check_types + - check_oas_snapshot 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 5382ab6017fa6..27289c864e2c1 100644 --- a/.buildkite/pipelines/pull_request/response_ops_cases.yml +++ b/.buildkite/pipelines/pull_request/response_ops_cases.yml @@ -7,9 +7,11 @@ steps: depends_on: - build - quick_checks + - checks - linting - linting_with_types - check_types + - check_oas_snapshot 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 de0cf4daefe73..9f9b606dced1d 100644 --- a/.buildkite/pipelines/pull_request/security_solution/ai_assistant.yml +++ b/.buildkite/pipelines/pull_request/security_solution/ai_assistant.yml @@ -7,9 +7,11 @@ steps: depends_on: - build - quick_checks + - checks - linting - linting_with_types - check_types + - check_oas_snapshot 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 d2f1571f9d93f..e1ba84bf4f661 100644 --- a/.buildkite/pipelines/pull_request/security_solution/cloud_security_posture.yml +++ b/.buildkite/pipelines/pull_request/security_solution/cloud_security_posture.yml @@ -7,9 +7,11 @@ steps: depends_on: - build - quick_checks + - checks - linting - linting_with_types - check_types + - check_oas_snapshot timeout_in_minutes: 60 parallelism: 1 retry: @@ -25,9 +27,11 @@ steps: depends_on: - build - quick_checks + - checks - linting - linting_with_types - check_types + - check_oas_snapshot 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 e7884df26b3e5..14d81aa9d3520 100644 --- a/.buildkite/pipelines/pull_request/security_solution/cypress_burn.yml +++ b/.buildkite/pipelines/pull_request/security_solution/cypress_burn.yml @@ -7,9 +7,11 @@ steps: depends_on: - build - quick_checks + - checks - linting - linting_with_types - check_types + - check_oas_snapshot timeout_in_minutes: 60 soft_fail: true parallelism: 1 @@ -24,9 +26,11 @@ steps: depends_on: - build - quick_checks + - checks - linting - linting_with_types - check_types + - check_oas_snapshot timeout_in_minutes: 60 parallelism: 1 retry: @@ -41,9 +45,11 @@ steps: depends_on: - build - quick_checks + - checks - linting - linting_with_types - check_types + - check_oas_snapshot 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 f9a79b052650f..28cc4f2812b5a 100644 --- a/.buildkite/pipelines/pull_request/security_solution/defend_workflows.yml +++ b/.buildkite/pipelines/pull_request/security_solution/defend_workflows.yml @@ -7,9 +7,11 @@ steps: depends_on: - build - quick_checks + - checks - linting - linting_with_types - check_types + - check_oas_snapshot timeout_in_minutes: 60 parallelism: 20 retry: diff --git a/.buildkite/pipelines/pull_request/security_solution/detection_engine.yml b/.buildkite/pipelines/pull_request/security_solution/detection_engine.yml index e879d2ad267f0..8f3ed2dc2ff82 100644 --- a/.buildkite/pipelines/pull_request/security_solution/detection_engine.yml +++ b/.buildkite/pipelines/pull_request/security_solution/detection_engine.yml @@ -7,9 +7,11 @@ steps: depends_on: - build - quick_checks + - checks - linting - linting_with_types - check_types + - check_oas_snapshot timeout_in_minutes: 60 parallelism: 5 retry: @@ -25,9 +27,11 @@ steps: depends_on: - build - quick_checks + - checks - linting - linting_with_types - check_types + - check_oas_snapshot 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 4e74af8f80742..1ff0999d33afd 100644 --- a/.buildkite/pipelines/pull_request/security_solution/entity_analytics.yml +++ b/.buildkite/pipelines/pull_request/security_solution/entity_analytics.yml @@ -7,9 +7,11 @@ steps: depends_on: - build - quick_checks + - checks - linting - linting_with_types - check_types + - check_oas_snapshot 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 5121899c17a59..749b480c5be50 100644 --- a/.buildkite/pipelines/pull_request/security_solution/explore.yml +++ b/.buildkite/pipelines/pull_request/security_solution/explore.yml @@ -7,9 +7,11 @@ steps: depends_on: - build - quick_checks + - checks - linting - linting_with_types - check_types + - check_oas_snapshot 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 f33634118fad2..3126aa00d0327 100644 --- a/.buildkite/pipelines/pull_request/security_solution/investigations.yml +++ b/.buildkite/pipelines/pull_request/security_solution/investigations.yml @@ -7,13 +7,14 @@ steps: depends_on: - build - quick_checks + - checks - linting - linting_with_types - check_types + - check_oas_snapshot timeout_in_minutes: 60 parallelism: 7 retry: automatic: - exit_status: '-1' limit: 1 - diff --git a/.buildkite/pipelines/pull_request/security_solution/osquery_cypress.yml b/.buildkite/pipelines/pull_request/security_solution/osquery_cypress.yml index 8d7650e93647c..55e5b7842f4f1 100644 --- a/.buildkite/pipelines/pull_request/security_solution/osquery_cypress.yml +++ b/.buildkite/pipelines/pull_request/security_solution/osquery_cypress.yml @@ -7,9 +7,11 @@ steps: depends_on: - build - quick_checks + - checks - linting - linting_with_types - check_types + - check_oas_snapshot 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 3255d3b3203c7..af29f1e545ca2 100644 --- a/.buildkite/pipelines/pull_request/security_solution/playwright.yml +++ b/.buildkite/pipelines/pull_request/security_solution/playwright.yml @@ -7,9 +7,11 @@ steps: depends_on: - build - quick_checks + - checks - linting - linting_with_types - check_types + - check_oas_snapshot 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 f49a96da39a89..085df0f65eeb5 100644 --- a/.buildkite/pipelines/pull_request/security_solution/rule_management.yml +++ b/.buildkite/pipelines/pull_request/security_solution/rule_management.yml @@ -7,9 +7,11 @@ steps: depends_on: - build - quick_checks + - checks - linting - linting_with_types - check_types + - check_oas_snapshot timeout_in_minutes: 60 parallelism: 4 retry: @@ -25,9 +27,11 @@ steps: depends_on: - build - quick_checks + - checks - linting - linting_with_types - check_types + - check_oas_snapshot 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 3d1a4f9b46f41..2cf1126cf1f5d 100644 --- a/.buildkite/pipelines/pull_request/slo_plugin_e2e.yml +++ b/.buildkite/pipelines/pull_request/slo_plugin_e2e.yml @@ -7,9 +7,11 @@ steps: depends_on: - build - quick_checks + - checks - linting - linting_with_types - check_types + - check_oas_snapshot 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 f5d6b841a953d..b4079b9fac307 100644 --- a/.buildkite/pipelines/pull_request/synthetics_plugin.yml +++ b/.buildkite/pipelines/pull_request/synthetics_plugin.yml @@ -7,9 +7,11 @@ steps: depends_on: - build - quick_checks + - checks - linting - linting_with_types - check_types + - check_oas_snapshot 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 a03915ef77099..4c1e05d7476fd 100644 --- a/.buildkite/pipelines/pull_request/uptime_plugin.yml +++ b/.buildkite/pipelines/pull_request/uptime_plugin.yml @@ -7,9 +7,11 @@ steps: depends_on: - build - quick_checks + - checks - linting - linting_with_types - check_types + - check_oas_snapshot 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 cd95f44fa2e86..4bade14464f35 100644 --- a/.buildkite/pipelines/pull_request/ux_plugin_e2e.yml +++ b/.buildkite/pipelines/pull_request/ux_plugin_e2e.yml @@ -7,9 +7,11 @@ steps: depends_on: - build - quick_checks + - checks - linting - linting_with_types - check_types + - check_oas_snapshot timeout_in_minutes: 60 artifact_paths: - 'x-pack/plugins/observability_solution/ux/e2e/.journeys/**/*'