diff --git a/.buildkite/pipelines/pull_request/base.yml b/.buildkite/pipelines/pull_request/base.yml index 03019a107df9e..df8962d427ec5 100644 --- a/.buildkite/pipelines/pull_request/base.yml +++ b/.buildkite/pipelines/pull_request/base.yml @@ -57,54 +57,6 @@ steps: - exit_status: '*' limit: 1 - - command: .buildkite/scripts/steps/functional/threat_intelligence.sh - label: 'Threat Intelligence Cypress Tests' - agents: - queue: n2-4-spot - depends_on: build - timeout_in_minutes: 60 - parallelism: 2 - retry: - automatic: - - exit_status: '*' - limit: 1 - - - command: .buildkite/scripts/steps/functional/osquery_cypress.sh - label: 'Osquery Cypress Tests' - agents: - queue: n2-4-spot - depends_on: build - timeout_in_minutes: 60 - parallelism: 6 - retry: - automatic: - - exit_status: '*' - limit: 1 - - - command: .buildkite/scripts/steps/functional/security_serverless_osquery.sh - label: 'Serverless Osquery Cypress Tests' - agents: - queue: n2-4-spot - depends_on: build - timeout_in_minutes: 60 - parallelism: 6 - retry: - automatic: - - exit_status: '*' - limit: 1 - - # status_exception: Native role management is not enabled in this Elasticsearch instance - # - command: .buildkite/scripts/steps/functional/security_serverless_defend_workflows.sh - # label: 'Serverless Security Defend Workflows Cypress Tests' - # agents: - # queue: n2-4-spot - # depends_on: build - # timeout_in_minutes: 60 - # retry: - # automatic: - # - exit_status: '*' - # limit: 1 - - command: .buildkite/scripts/steps/lint.sh label: 'Linting' agents: diff --git a/.buildkite/pipelines/pull_request/security_solution/defend_workflows.yml b/.buildkite/pipelines/pull_request/security_solution/defend_workflows.yml index 29d90461b04d5..248d953c485e6 100644 --- a/.buildkite/pipelines/pull_request/security_solution/defend_workflows.yml +++ b/.buildkite/pipelines/pull_request/security_solution/defend_workflows.yml @@ -22,3 +22,15 @@ steps: automatic: - exit_status: '*' limit: 1 + + # status_exception: Native role management is not enabled in this Elasticsearch instance + # - command: .buildkite/scripts/steps/functional/security_serverless_defend_workflows.sh + # label: 'Serverless Security Defend Workflows Cypress Tests' + # agents: + # queue: n2-4-spot + # depends_on: build + # timeout_in_minutes: 60 + # retry: + # automatic: + # - exit_status: '*' + # limit: 1 diff --git a/.buildkite/pipelines/pull_request/security_solution/osquery.yml b/.buildkite/pipelines/pull_request/security_solution/osquery.yml new file mode 100644 index 0000000000000..b969a468c81bc --- /dev/null +++ b/.buildkite/pipelines/pull_request/security_solution/osquery.yml @@ -0,0 +1,24 @@ +steps: + - command: .buildkite/scripts/steps/functional/osquery_cypress.sh + label: 'Osquery Cypress Tests' + agents: + queue: n2-4-spot + depends_on: build + timeout_in_minutes: 60 + parallelism: 6 + retry: + automatic: + - exit_status: '*' + limit: 1 + + - command: .buildkite/scripts/steps/functional/security_serverless_osquery.sh + label: 'Serverless Osquery Cypress Tests' + agents: + queue: n2-4-spot + depends_on: build + timeout_in_minutes: 60 + parallelism: 6 + retry: + automatic: + - exit_status: '*' + limit: 1 diff --git a/.buildkite/pipelines/pull_request/security_solution/threat_intelligence.yml b/.buildkite/pipelines/pull_request/security_solution/threat_intelligence.yml new file mode 100644 index 0000000000000..6a82abe46eee1 --- /dev/null +++ b/.buildkite/pipelines/pull_request/security_solution/threat_intelligence.yml @@ -0,0 +1,12 @@ +steps: + - command: .buildkite/scripts/steps/functional/threat_intelligence.sh + label: 'Threat Intelligence Cypress Tests' + agents: + queue: n2-4-spot + depends_on: build + timeout_in_minutes: 60 + parallelism: 2 + retry: + automatic: + - exit_status: '*' + limit: 1 diff --git a/.buildkite/scripts/pipelines/pull_request/pipeline.ts b/.buildkite/scripts/pipelines/pull_request/pipeline.ts index ca0a83616492e..761e42fee725e 100644 --- a/.buildkite/scripts/pipelines/pull_request/pipeline.ts +++ b/.buildkite/scripts/pipelines/pull_request/pipeline.ts @@ -265,6 +265,34 @@ const uploadPipeline = (pipelineContent: string | object) => { ); } + if ( + (await doAnyChangesMatch([ + /^package.json/, + /^packages\/kbn-securitysolution-.*/, + /^x-pack\/plugins\/threat_intelligence/, + /^x-pack\/packages\/security-solution/, + /^x-pack\/test\/security_solution_cypress/, + ])) || + GITHUB_PR_LABELS.includes('ci:all-cypress-suites') + ) { + pipeline.push( + getPipeline('.buildkite/pipelines/pull_request/security_solution/threat_intelligence.yml') + ); + } + + if ( + (await doAnyChangesMatch([ + /^package.json/, + /^packages\/kbn-securitysolution-.*/, + /^x-pack\/plugins\/osquery/, + /^x-pack\/packages\/security-solution/, + /^x-pack\/test\/security_solution_cypress/, + ])) || + GITHUB_PR_LABELS.includes('ci:all-cypress-suites') + ) { + pipeline.push(getPipeline('.buildkite/pipelines/pull_request/security_solution/osquery.yml')); + } + pipeline.push(getPipeline('.buildkite/pipelines/pull_request/post_build.yml')); // remove duplicated steps