Skip to content

Commit

Permalink
[Security Solution][Serverless] Security verify promote es (#188971)
Browse files Browse the repository at this point in the history
## Summary

In this PR, the security FTR tests are added in the
[kibana-elasticsearch-serverless-verify-and-promote](https://buildkite.com/elastic/kibana-elasticsearch-serverless-verify-and-promote)

In order for this to be done a [new step is
added](https://github.com/elastic/kibana/pull/188971/files#diff-c24aca993d6eaa3978eb5334eb5a34d8c7a18a1f5a34b41d43ec9db3e9972a81R67)
where only the security FTR + integration tests are running.

The reason that I preferred to split the security tests into a different
step is the fact that they do not exactly follow the execution way of
the rest of the tests in the specific pipeline. They are executed in a
different config pattern. We could definitely add the pattern in the
existing step like the following way, but I would ask from feedback from
the relevant teams for this:
`FTR_CONFIG_PATTERNS:
"**/test_serverless/**,**/test/security_solution_api_integration/**/serverless.config.ts"`
 
In order for a test to be executed, the test file has mandatorily to be
part of the `index.ts` file like
[here](https://github.com/elastic/kibana/pull/188971/files#diff-ad4cd826846527b8d18ce4162f5d006723d8ddf6f64a2108528ee7870bd281b0R21).

Then in order to add a test or a suite of tests as part of this pipeline
a tag needs to be added like [this
line](https://github.com/elastic/kibana/pull/188971/files#diff-d166758022907afbfefce03776d6395740408bc65f955549264e7bc9a76087c6R80).

---------

Co-authored-by: Brad White <[email protected]>
Co-authored-by: Gloria Hornero <[email protected]>
  • Loading branch information
3 people authored Aug 8, 2024
1 parent 836af5f commit 83e78ea
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 29 deletions.
56 changes: 28 additions & 28 deletions .buildkite/pipelines/es_serverless/verify_es_serverless_image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,26 +44,26 @@ steps:
timeout_in_minutes: 60
retry:
automatic:
- exit_status: '-1'
- exit_status: "-1"
limit: 3

- label: "Pick Test Group Run Order (FTR + Integration)"
command: .buildkite/scripts/steps/test/pick_test_group_run_order.sh
depends_on: build
timeout_in_minutes: 10
env:
FTR_CONFIGS_SCRIPT: 'TEST_ES_SERVERLESS_IMAGE=$ES_SERVERLESS_IMAGE .buildkite/scripts/steps/test/ftr_configs.sh'
JEST_INTEGRATION_SCRIPT: 'TEST_ES_SERVERLESS_IMAGE=$ES_SERVERLESS_IMAGE .buildkite/scripts/steps/test/jest_integration.sh'
FTR_CONFIG_PATTERNS: '**/test_serverless/**'
FTR_EXTRA_ARGS: '$FTR_EXTRA_ARGS'
LIMIT_CONFIG_TYPE: 'functional,integration'
FTR_CONFIGS_SCRIPT: "TEST_ES_SERVERLESS_IMAGE=$ES_SERVERLESS_IMAGE .buildkite/scripts/steps/test/ftr_configs.sh"
JEST_INTEGRATION_SCRIPT: "TEST_ES_SERVERLESS_IMAGE=$ES_SERVERLESS_IMAGE .buildkite/scripts/steps/test/jest_integration.sh"
FTR_CONFIG_PATTERNS: "**/test_serverless/**,**/test/security_solution_api_integration/**/serverless.config.ts"
FTR_EXTRA_ARGS: "$FTR_EXTRA_ARGS"
LIMIT_CONFIG_TYPE: "functional,integration"
retry:
automatic:
- exit_status: '*'
- exit_status: "*"
limit: 1

- command: .buildkite/scripts/steps/functional/security_serverless_entity_analytics.sh
label: 'Serverless Entity Analytics - Security Solution Cypress Tests'
label: "Serverless Entity Analytics - Security Solution Cypress Tests"
if: "build.env('SKIP_CYPRESS') != '1' && build.env('SKIP_CYPRESS') != 'true'"
agents:
image: family/kibana-ubuntu-2004
Expand All @@ -76,11 +76,11 @@ steps:
parallelism: 3
retry:
automatic:
- exit_status: '-1'
- exit_status: "-1"
limit: 1

- command: .buildkite/scripts/steps/functional/security_serverless_explore.sh
label: 'Serverless Explore - Security Solution Cypress Tests'
label: "Serverless Explore - Security Solution Cypress Tests"
if: "build.env('SKIP_CYPRESS') != '1' && build.env('SKIP_CYPRESS') != 'true'"
agents:
image: family/kibana-ubuntu-2004
Expand All @@ -93,11 +93,11 @@ steps:
parallelism: 4
retry:
automatic:
- exit_status: '-1'
- exit_status: "-1"
limit: 1

- command: .buildkite/scripts/steps/functional/security_serverless_investigations.sh
label: 'Serverless Investigations - Security Solution Cypress Tests'
label: "Serverless Investigations - Security Solution Cypress Tests"
if: "build.env('SKIP_CYPRESS') != '1' && build.env('SKIP_CYPRESS') != 'true'"
agents:
image: family/kibana-ubuntu-2004
Expand All @@ -110,11 +110,11 @@ steps:
parallelism: 8
retry:
automatic:
- exit_status: '-1'
- exit_status: "-1"
limit: 1

- command: .buildkite/scripts/steps/functional/security_serverless_rule_management.sh
label: 'Serverless Rule Management - Security Solution Cypress Tests'
label: "Serverless Rule Management - Security Solution Cypress Tests"
if: "build.env('SKIP_CYPRESS') != '1' && build.env('SKIP_CYPRESS') != 'true'"
agents:
image: family/kibana-ubuntu-2004
Expand All @@ -127,11 +127,11 @@ steps:
parallelism: 5
retry:
automatic:
- exit_status: '-1'
- exit_status: "-1"
limit: 1

- command: .buildkite/scripts/steps/functional/security_serverless_rule_management_prebuilt_rules.sh
label: 'Serverless Rule Management - Prebuilt Rules - Security Solution Cypress Tests'
label: "Serverless Rule Management - Prebuilt Rules - Security Solution Cypress Tests"
if: "build.env('SKIP_CYPRESS') != '1' && build.env('SKIP_CYPRESS') != 'true'"
agents:
image: family/kibana-ubuntu-2004
Expand All @@ -144,11 +144,11 @@ steps:
parallelism: 1
retry:
automatic:
- exit_status: '-1'
- exit_status: "-1"
limit: 1

- command: .buildkite/scripts/steps/functional/security_serverless_detection_engine.sh
label: 'Serverless Detection Engine - Security Solution Cypress Tests'
label: "Serverless Detection Engine - Security Solution Cypress Tests"
if: "build.env('SKIP_CYPRESS') != '1' && build.env('SKIP_CYPRESS') != 'true'"
agents:
image: family/kibana-ubuntu-2004
Expand All @@ -161,11 +161,11 @@ steps:
parallelism: 5
retry:
automatic:
- exit_status: '-1'
- exit_status: "-1"
limit: 1

- command: .buildkite/scripts/steps/functional/security_serverless_detection_engine_exceptions.sh
label: 'Serverless Detection Engine - Exceptions - Security Solution Cypress Tests'
label: "Serverless Detection Engine - Exceptions - Security Solution Cypress Tests"
if: "build.env('SKIP_CYPRESS') != '1' && build.env('SKIP_CYPRESS') != 'true'"
agents:
image: family/kibana-ubuntu-2004
Expand All @@ -178,11 +178,11 @@ steps:
parallelism: 2
retry:
automatic:
- exit_status: '-1'
- exit_status: "-1"
limit: 1

- command: .buildkite/scripts/steps/functional/security_serverless_ai_assistant.sh
label: 'Serverless AI Assistant - Security Solution Cypress Tests'
label: "Serverless AI Assistant - Security Solution Cypress Tests"
if: "build.env('SKIP_CYPRESS') != '1' && build.env('SKIP_CYPRESS') != 'true'"
agents:
image: family/kibana-ubuntu-2004
Expand All @@ -195,11 +195,11 @@ steps:
parallelism: 1
retry:
automatic:
- exit_status: '-1'
- exit_status: "-1"
limit: 1

- command: .buildkite/scripts/steps/functional/defend_workflows_serverless.sh
label: 'Defend Workflows Cypress Tests on Serverless'
label: "Defend Workflows Cypress Tests on Serverless"
if: "build.env('SKIP_CYPRESS') != '1' && build.env('SKIP_CYPRESS') != 'true'"
agents:
image: family/kibana-ubuntu-2004
Expand All @@ -214,11 +214,11 @@ steps:
parallelism: 12
retry:
automatic:
- exit_status: '-1'
- exit_status: "-1"
limit: 1

- command: .buildkite/scripts/steps/functional/security_serverless_osquery.sh
label: 'Serverless Osquery Cypress Tests'
label: "Serverless Osquery Cypress Tests"
if: "build.env('SKIP_CYPRESS') != '1' && build.env('SKIP_CYPRESS') != 'true'"
agents:
image: family/kibana-ubuntu-2004
Expand All @@ -231,7 +231,7 @@ steps:
parallelism: 7
retry:
automatic:
- exit_status: '-1'
- exit_status: "-1"
limit: 1

- wait: ~
Expand All @@ -241,6 +241,6 @@ steps:

- wait: ~

- label: 'Post-Build'
- label: "Post-Build"
command: .buildkite/scripts/lifecycle/post_build.sh
timeout_in_minutes: 10
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,6 @@ export default function ({ loadTestFile }: FtrProviderContext) {
loadTestFile(require.resolve('./asset_criticality'));
loadTestFile(require.resolve('./asset_criticality_privileges'));
loadTestFile(require.resolve('./asset_criticality_csv_upload'));
loadTestFile(require.resolve('./risk_score_entity_calculation'));
});
}
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@ export default ({ getService }: FtrProviderContext): void => {
});
};

describe('@ess @serverless @serverlessQA Risk Scoring Entity Calculation API', () => {
describe('@ess @serverless @serverlessQA Risk Scoring Entity Calculation API', function () {
this.tags(['esGate']);
before(async () => {
enableAssetCriticalityAdvancedSetting(kibanaServer, log);
});
Expand Down

0 comments on commit 83e78ea

Please sign in to comment.