Skip to content

Commit

Permalink
ci: move remaining Cypress tests behind GH label
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Watson committed Jan 9, 2024
1 parent 3433f43 commit a2f2f7e
Show file tree
Hide file tree
Showing 5 changed files with 76 additions and 48 deletions.
48 changes: 0 additions & 48 deletions .buildkite/pipelines/pull_request/base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
24 changes: 24 additions & 0 deletions .buildkite/pipelines/pull_request/security_solution/osquery.yml
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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
28 changes: 28 additions & 0 deletions .buildkite/scripts/pipelines/pull_request/pipeline.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a2f2f7e

Please sign in to comment.