Skip to content

Commit

Permalink
Merge branch 'main' into ml-dfa-deploy-models-functional-tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kibanamachine authored Aug 17, 2023
2 parents 66f671f + 63da51d commit 6727889
Show file tree
Hide file tree
Showing 1,779 changed files with 30,651 additions and 11,930 deletions.
7 changes: 4 additions & 3 deletions .buildkite/ftr_configs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ disabled:
- x-pack/plugins/apm/ftr_e2e/ftr_config.ts
- x-pack/test_serverless/functional/test_suites/observability/cypress/config_headless.ts
- x-pack/test_serverless/functional/test_suites/observability/cypress/config_runner.ts
- x-pack/test/security_solution_cypress/serverless_config.ts
- x-pack/plugins/profiling/e2e/ftr_config_open.ts
- x-pack/plugins/profiling/e2e/ftr_config_runner.ts
- x-pack/plugins/profiling/e2e/ftr_config.ts
Expand All @@ -67,13 +68,11 @@ disabled:
- x-pack/test/plugin_api_perf/config.js
- x-pack/test/screenshot_creation/config.ts
- x-pack/test/fleet_packages/config.ts
- x-pack/test/api_integration/apis/asset_manager/config_with_assets_source.ts

# Scalability testing config that we run in its own pipeline
- x-pack/test/scalability/config.ts

# Asset Manager configs, in tech preview, will move to enabled after more stability introduced
- x-pack/test/api_integration/apis/asset_manager/config.ts

# Serverless base config files
- x-pack/test_serverless/api_integration/config.base.ts
- x-pack/test_serverless/functional/config.base.ts
Expand Down Expand Up @@ -175,6 +174,7 @@ enabled:
- x-pack/test/api_integration/config_security_trial.ts
- x-pack/test/api_integration/apis/aiops/config.ts
- x-pack/test/api_integration/apis/asset_manager/config_when_disabled.ts
- x-pack/test/api_integration/apis/asset_manager/config_with_signals_source.ts
- x-pack/test/api_integration/apis/cases/config.ts
- x-pack/test/api_integration/apis/cloud_security_posture/config.ts
- x-pack/test/api_integration/apis/console/config.ts
Expand Down Expand Up @@ -404,6 +404,7 @@ enabled:
- x-pack/performance/journeys/flight_dashboard.ts
- x-pack/performance/journeys/login.ts
- x-pack/performance/journeys/many_fields_discover.ts
- x-pack/performance/journeys/many_fields_lens_editor.ts
- x-pack/performance/journeys/many_fields_transform.ts
- x-pack/performance/journeys/promotion_tracking_dashboard.ts
- x-pack/performance/journeys/web_logs_dashboard.ts
Expand Down
51 changes: 46 additions & 5 deletions .buildkite/pipelines/pull_request/base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,17 +101,58 @@ steps:
queue: n2-4-spot
depends_on: build
timeout_in_minutes: 40
soft_fail:
- exit_status: 10
parallelism: 10
soft_fail: true
retry:
automatic:
- exit_status: '*'
limit: 1
artifact_paths:
- "target/kibana-security-solution/**/*"

- 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: 40
soft_fail: true
retry:
automatic:
- exit_status: '*'
limit: 1
artifact_paths:
- "target/kibana-security-solution/**/*"

- command: .buildkite/scripts/steps/functional/security_serverless_investigations.sh
label: 'Serverless Security Investigations Cypress Tests'
agents:
queue: n2-4-spot
depends_on: build
timeout_in_minutes: 40
parallelism: 4
soft_fail: true
retry:
automatic:
- exit_status: '-1'
limit: 3
- exit_status: '*'
limit: 1
artifact_paths:
- "target/kibana-security-serverless/**/*"
- "target/kibana-security-solution/**/*"

- command: .buildkite/scripts/steps/functional/security_serverless_explore.sh
label: 'Serverless Security Explore Cypress Tests'
agents:
queue: n2-4-spot
depends_on: build
timeout_in_minutes: 40
parallelism: 2
soft_fail: true
retry:
automatic:
- exit_status: '*'
limit: 1
artifact_paths:
- "target/kibana-security-solution/**/*"

- command: .buildkite/scripts/steps/lint.sh
label: 'Linting'
Expand Down
10 changes: 10 additions & 0 deletions .buildkite/pipelines/pull_request/osquery_cypress.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,13 @@ steps:
limit: 1
artifact_paths:
- "target/kibana-osquery/**/*"

- command: .buildkite/scripts/steps/functional/osquery_cypress_burn.sh
label: 'Osquery Cypress Tests, burning changed specs'
agents:
queue: n2-4-spot
depends_on: build
timeout_in_minutes: 50
soft_fail: true
artifact_paths:
- "target/kibana-osquery/**/*"
2 changes: 1 addition & 1 deletion .buildkite/pipelines/pull_request/security_solution.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ steps:
parallelism: 1
soft_fail: true
artifact_paths:
- "target/kibana-security-solution/**/*"
- "target/kibana-security-solution/**/*"
4 changes: 3 additions & 1 deletion .buildkite/scripts/pipelines/pull_request/pipeline.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ const uploadPipeline = (pipelineContent: string | object) => {
getPipeline('.buildkite/pipelines/pull_request/security_solution_explore.yml')
);
pipeline.push(getPipeline('.buildkite/pipelines/pull_request/defend_workflows.yml'));
pipeline.push(getPipeline('.buildkite/pipelines/pull_request/osquery_cypress.yml'));
}

if (
Expand Down Expand Up @@ -200,7 +201,8 @@ const uploadPipeline = (pipelineContent: string | object) => {

pipeline.push(getPipeline('.buildkite/pipelines/pull_request/post_build.yml'));

uploadPipeline(pipeline.join('\n'));
// remove duplicated steps
uploadPipeline([...new Set(pipeline)].join('\n'));
} catch (ex) {
console.error('PR pipeline generation error', ex.message);
process.exit(1);
Expand Down
17 changes: 17 additions & 0 deletions .buildkite/scripts/steps/functional/osquery_cypress_burn.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/usr/bin/env bash

set -euo pipefail

source .buildkite/scripts/common/util.sh
source .buildkite/scripts/steps/functional/common_cypress.sh

.buildkite/scripts/bootstrap.sh
node scripts/build_kibana_platform_plugins.js

export JOB=kibana-osquery-cypress

buildkite-agent meta-data set "${BUILDKITE_JOB_ID}_is_test_execution_step" 'false'

echo "--- Osquery Cypress tests, burning changed specs (Chrome)"

yarn --cwd x-pack/plugins/osquery cypress:changed-specs-only
2 changes: 1 addition & 1 deletion .buildkite/scripts/steps/functional/response_ops.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ export KIBANA_INSTALL_DIR=${KIBANA_BUILD_LOCATION}

echo "--- Response Ops Cypress Tests on Security Solution"

yarn --cwd x-pack/plugins/security_solution cypress:run:respops
yarn --cwd x-pack/test/security_solution_cypress cypress:run:respops:ess
2 changes: 1 addition & 1 deletion .buildkite/scripts/steps/functional/response_ops_cases.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ export KIBANA_INSTALL_DIR=${KIBANA_BUILD_LOCATION}

echo "--- Response Ops Cases Cypress Tests on Security Solution"

yarn --cwd x-pack/plugins/security_solution cypress:run:cases
yarn --cwd x-pack/test/security_solution_cypress cypress:run:cases:ess
2 changes: 1 addition & 1 deletion .buildkite/scripts/steps/functional/security_serverless.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ export KIBANA_INSTALL_DIR=${KIBANA_BUILD_LOCATION}

echo "--- Security Serverless Cypress"

yarn --cwd x-pack/test_serverless/functional/test_suites/security/cypress cypress:run
yarn --cwd x-pack/test/security_solution_cypress cypress:run:serverless
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/usr/bin/env bash

set -euo pipefail

source .buildkite/scripts/steps/functional/common.sh
source .buildkite/scripts/steps/functional/common_cypress.sh

export JOB=kibana-serverless-security-cypress
export KIBANA_INSTALL_DIR=${KIBANA_BUILD_LOCATION}

echo "--- Security Defend Workflows Serverless Cypress"

yarn --cwd x-pack/test_serverless/functional/test_suites/security/cypress cypress:run
13 changes: 13 additions & 0 deletions .buildkite/scripts/steps/functional/security_serverless_explore.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/usr/bin/env bash

set -euo pipefail

source .buildkite/scripts/steps/functional/common.sh
source .buildkite/scripts/steps/functional/common_cypress.sh

export JOB=kibana-security-solution-chrome
export KIBANA_INSTALL_DIR=${KIBANA_BUILD_LOCATION}

echo "--- Explore Cypress Tests on Serverless"

yarn --cwd x-pack/test/security_solution_cypress cypress:explore:run:serverless
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/usr/bin/env bash

set -euo pipefail

source .buildkite/scripts/steps/functional/common.sh
source .buildkite/scripts/steps/functional/common_cypress.sh

export JOB=kibana-security-solution-chrome
export KIBANA_INSTALL_DIR=${KIBANA_BUILD_LOCATION}

echo "--- Investigations Cypress Tests on Serverless"

yarn --cwd x-pack/test/security_solution_cypress cypress:investigations:run:serverless
2 changes: 1 addition & 1 deletion .buildkite/scripts/steps/functional/security_solution.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ export KIBANA_INSTALL_DIR=${KIBANA_BUILD_LOCATION}

echo "--- Security Solution Cypress tests (Chrome)"

yarn --cwd x-pack/plugins/security_solution cypress:run
yarn --cwd x-pack/test/security_solution_cypress cypress:run:ess
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ buildkite-agent meta-data set "${BUILDKITE_JOB_ID}_is_test_execution_step" 'fals

echo "--- Security Solution Cypress tests, burning changed specs (Chrome)"

yarn --cwd x-pack/plugins/security_solution cypress:changed-specs-only
yarn --cwd x-pack/test/security_solution_cypress cypress:changed-specs-only:ess
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ export KIBANA_INSTALL_DIR=${KIBANA_BUILD_LOCATION}

echo "--- Explore Cypress Tests on Security Solution"

yarn --cwd x-pack/plugins/security_solution cypress:explore:run
yarn --cwd x-pack/test/security_solution_cypress cypress:explore:run:ess
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ export KIBANA_INSTALL_DIR=${KIBANA_BUILD_LOCATION}

echo "--- Investigations Cypress Tests on Security Solution"

yarn --cwd x-pack/plugins/security_solution cypress:investigations:run
yarn --cwd x-pack/test/security_solution_cypress cypress:investigations:run:ess
Loading

0 comments on commit 6727889

Please sign in to comment.