[Security]Grouping steps/functional scripts (#172151)

## Summary

This PR is reducing the amount of functional test scripts for buildkite.

Each different target and team was having an identical cypress init
script with chaning only:
- message
- package.json target
- working directory
- job name

With this PR a new unified way to trigger cypress tests, is introduced,
in order to reduce maintenance cost and improve consistency and
readability.

All Cypress test executions are going through the script:
`.buildkite/scripts/steps/functional/security_cypress_exec.sh`

In the buildkite `*.yml` files all we need to do is target this script
with the command and then pass env params for the above mentioned
variables. E.g:

<img width="566" alt="Screenshot 2023-11-29 at 6 17 35 PM"
src="55475300-7e98-45fa-a3e9-18f4ffdeb5c2">


### Checklist

Delete any items that are not applicable to this PR.

- [ ] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [ ] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [ ] Any UI touched in this PR is usable by keyboard only (learn more
about [keyboard accessibility](https://webaim.org/techniques/keyboard/))
- [ ] Any UI touched in this PR does not create any new axe failures
(run axe in browser:
[FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/),
[Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))
- [ ] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [ ] This renders correctly on smaller devices using a responsive
layout. (You can test this [in your
browser](https://www.browserstack.com/guide/responsive-testing-on-local-server))
- [ ] This was checked for [cross-browser
compatibility](https://www.elastic.co/support/matrix#matrix_browsers)


### Risk Matrix

Delete this section if it is not applicable to this PR.

Before closing this PR, invite QA, stakeholders, and other developers to
identify risks that should be tested prior to the change/feature
release.

When forming the risk matrix, consider some of the following examples
and how they may potentially impact the change:

| Risk | Probability | Severity | Mitigation/Notes |

|---------------------------|-------------|----------|-------------------------|
| Multiple Spaces&mdash;unexpected behavior in non-default Kibana Space.
| Low | High | Integration tests will verify that all features are still
supported in non-default Kibana Space and when user switches between
spaces. |
| Multiple nodes&mdash;Elasticsearch polling might have race conditions
when multiple Kibana nodes are polling for the same tasks. | High | Low
| Tasks are idempotent, so executing them multiple times will not result
in logical error, but will degrade performance. To test for this case we
add plenty of unit tests around this logic and document manual testing
procedure. |
| Code should gracefully handle cases when feature X or plugin Y are
disabled. | Medium | High | Unit tests will verify that any feature flag
or plugin combination still results in our service operational. |
| [See more potential risk
examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx) |


### For maintainers

- [ ] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

---------

Co-authored-by: Gloria Hornero <gloria.hornero@elastic.co>
This commit is contained in:
dkirchan 2023-11-30 14:34:24 +02:00 committed by GitHub
parent 26f56009ce
commit c96b63c5a2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 232 additions and 259 deletions

View file

@ -56,7 +56,12 @@ steps:
- exit_status: '*'
limit: 1
- command: .buildkite/scripts/steps/functional/security_serverless.sh
- command: .buildkite/scripts/steps/functional/security_cypress_exec.sh
env:
TARGET: cypress:run:serverless
ROOT_DIR: x-pack/test/security_solution_cypress
JOB_TITLE: kibana-serverless-security-cypress
MSG: "--- Security Serverless Cypress Tests"
label: 'Serverless Security Cypress Tests'
if: "build.env('SKIP_CYPRESS') != '1' && build.env('SKIP_CYPRESS') != 'true'"
agents:
@ -69,7 +74,12 @@ steps:
- exit_status: '*'
limit: 1
- command: .buildkite/scripts/steps/functional/security_serverless_explore.sh
- command: .buildkite/scripts/steps/functional/security_cypress_exec.sh
env:
TARGET: cypress:explore:run:serverless
ROOT_DIR: x-pack/test/security_solution_cypress
JOB_TITLE: kibana-security-solution-chrome
MSG: "--- Explore - Security Solution Cypress Tests"
label: 'Serverless Explore - Security Solution Cypress Tests'
if: "build.env('SKIP_CYPRESS') != '1' && build.env('SKIP_CYPRESS') != 'true'"
agents:
@ -82,7 +92,12 @@ steps:
- exit_status: '*'
limit: 1
- command: .buildkite/scripts/steps/functional/security_serverless_investigations.sh
- command: .buildkite/scripts/steps/functional/security_cypress_exec.sh
env:
TARGET: cypress:investigations:run:serverless
ROOT_DIR: x-pack/test/security_solution_cypress
JOB_TITLE: kibana-security-solution-chrome
MSG: "--- Investigations Cypress Tests on Serverless"
label: 'Serverless Investigations - Security Solution Cypress Tests'
if: "build.env('SKIP_CYPRESS') != '1' && build.env('SKIP_CYPRESS') != 'true'"
agents:
@ -95,7 +110,12 @@ steps:
- exit_status: '*'
limit: 1
- command: .buildkite/scripts/steps/functional/security_serverless_rule_management.sh
- command: .buildkite/scripts/steps/functional/security_cypress_exec.sh
env:
TARGET: cypress:rule_management:run:serverless
ROOT_DIR: x-pack/test/security_solution_cypress
JOB_TITLE: kibana-security-solution-chrome
MSG: "--- Rule Management Cypress Tests on Serverless"
label: 'Serverless Rule Management - Security Solution Cypress Tests'
if: "build.env('SKIP_CYPRESS') != '1' && build.env('SKIP_CYPRESS') != 'true'"
agents:
@ -108,7 +128,12 @@ steps:
- exit_status: '*'
limit: 1
- command: .buildkite/scripts/steps/functional/security_serverless_rule_management_prebuilt_rules.sh
- command: .buildkite/scripts/steps/functional/security_cypress_exec.sh
env:
TARGET: cypress:rule_management:prebuilt_rules:run:serverless
ROOT_DIR: x-pack/test/security_solution_cypress
JOB_TITLE: kibana-security-solution-chrome
MSG: "--- Rule Management - Prebuilt Rules - Cypress Tests on Serverless"
label: 'Serverless Rule Management - Prebuilt Rules - Security Solution Cypress Tests'
if: "build.env('SKIP_CYPRESS') != '1' && build.env('SKIP_CYPRESS') != 'true'"
agents:
@ -121,7 +146,12 @@ steps:
- exit_status: '*'
limit: 1
- command: .buildkite/scripts/steps/functional/defend_workflows_serverless.sh
- command: .buildkite/scripts/steps/functional/security_cypress_exec.sh
env:
TARGET: cypress:dw:serverless:run
ROOT_DIR: x-pack/plugins/security_solution
JOB_TITLE: kibana-defend-workflows-serverless-cypress
MSG: "--- 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:

View file

@ -79,7 +79,12 @@ steps:
- exit_status: '*'
limit: 1
- command: .buildkite/scripts/steps/functional/security_serverless.sh
- command: .buildkite/scripts/steps/functional/security_cypress_exec.sh
env:
TARGET: cypress:run:serverless
ROOT_DIR: x-pack/test/security_solution_cypress
JOB_TITLE: kibana-serverless-security-cypress
MSG: "--- Security Serverless Cypress Tests"
label: 'Serverless Security Cypress Tests'
agents:
queue: n2-4-spot
@ -91,8 +96,13 @@ steps:
- exit_status: '*'
limit: 1
- command: .buildkite/scripts/steps/functional/security_serverless_explore.sh
label: 'Serverless Explore - Security Solution Cypress Tests'
- command: .buildkite/scripts/steps/functional/security_cypress_exec.sh
env:
TARGET: cypress:explore:run:serverless
ROOT_DIR: x-pack/test/security_solution_cypress
JOB_TITLE: kibana-security-solution-chrome
MSG: "--- Serverless Explore - Security Cypress Tests"
label: 'Serverless Explore - Security Cypress Tests'
agents:
queue: n2-4-spot
depends_on: build
@ -103,8 +113,13 @@ steps:
- exit_status: '*'
limit: 1
- command: .buildkite/scripts/steps/functional/security_serverless_investigations.sh
label: 'Serverless Investigations - Security Solution Cypress Tests'
- command: .buildkite/scripts/steps/functional/security_cypress_exec.sh
env:
TARGET: cypress:investigations:run:serverless
ROOT_DIR: x-pack/test/security_solution_cypress
JOB_TITLE: kibana-security-solution-chrome
MSG: "--- Serverless Investigations - Security Cypress Tests"
label: 'Serverless Investigations - Security Cypress Tests'
agents:
queue: n2-4-spot
depends_on: build
@ -115,8 +130,13 @@ steps:
- exit_status: '*'
limit: 1
- command: .buildkite/scripts/steps/functional/security_serverless_rule_management.sh
label: 'Serverless Rule Management - Security Solution Cypress Tests'
- command: .buildkite/scripts/steps/functional/security_cypress_exec.sh
env:
TARGET: cypress:rule_management:run:serverless
ROOT_DIR: x-pack/test/security_solution_cypress
JOB_TITLE: kibana-security-solution-chrome
MSG: "--- Serverless Rule Management - Security Cypress Tests "
label: 'Serverless Rule Management - Security Cypress Tests'
agents:
queue: n2-4-spot
depends_on: build
@ -127,8 +147,13 @@ steps:
- exit_status: '*'
limit: 1
- command: .buildkite/scripts/steps/functional/security_serverless_rule_management_prebuilt_rules.sh
label: 'Serverless Rule Management - Prebuilt Rules - Security Solution Cypress Tests'
- command: .buildkite/scripts/steps/functional/security_cypress_exec.sh
env:
TARGET: cypress:rule_management:prebuilt_rules:run:serverless
ROOT_DIR: x-pack/test/security_solution_cypress
JOB_TITLE: kibana-security-solution-chrome
MSG: "--- Rule Management - Prebuilt Rules - Security Cypress Tests"
label: 'Rule Management - Prebuilt Rules - Security Cypress Tests'
agents:
queue: n2-4-spot
depends_on: build
@ -139,7 +164,12 @@ steps:
- exit_status: '*'
limit: 1
- command: .buildkite/scripts/steps/functional/security_solution_rule_management.sh
- command: .buildkite/scripts/steps/functional/security_cypress_exec.sh
env:
TARGET: cypress:rule_management:run:ess
ROOT_DIR: x-pack/test/security_solution_cypress
JOB_TITLE: kibana-security-solution-chrome
MSG: "--- Rule Management - Security Solution Cypress Tests"
label: 'Rule Management - Security Solution Cypress Tests'
agents:
queue: n2-4-spot
@ -151,7 +181,12 @@ steps:
- exit_status: '*'
limit: 1
- command: .buildkite/scripts/steps/functional/security_solution_rule_management_prebuilt_rules.sh
- command: .buildkite/scripts/steps/functional/security_cypress_exec.sh
env:
TARGET: cypress:rule_management:prebuilt_rules:run:ess
ROOT_DIR: x-pack/test/security_solution_cypress
JOB_TITLE: kibana-security-solution-chrome
MSG: "--- Rule Management - Prebuilt Rules - Security Solution Cypress Tests"
label: 'Rule Management - Prebuilt Rules - Security Solution Cypress Tests'
agents:
queue: n2-4-spot
@ -163,7 +198,12 @@ steps:
- exit_status: '*'
limit: 1
- command: .buildkite/scripts/steps/functional/security_solution.sh
- command: .buildkite/scripts/steps/functional/security_cypress_exec.sh
env:
TARGET: cypress:run:ess
ROOT_DIR: x-pack/test/security_solution_cypress
JOB_TITLE: kibana-security-solution-chrome
MSG: "--- Security Solution Cypress tests (Chrome)"
label: 'Security Solution Cypress Tests'
agents:
queue: n2-4-spot
@ -175,7 +215,12 @@ steps:
- exit_status: '*'
limit: 1
- command: .buildkite/scripts/steps/functional/security_solution_explore.sh
- command: .buildkite/scripts/steps/functional/security_cypress_exec.sh
env:
TARGET: cypress:explore:run:ess
ROOT_DIR: x-pack/test/security_solution_cypress
JOB_TITLE: kibana-security-solution-chrome
MSG: "--- Explore Cypress Tests on Security Solution"
label: 'Explore - Security Solution Cypress Tests'
agents:
queue: n2-4-spot
@ -187,7 +232,12 @@ steps:
- exit_status: '*'
limit: 1
- command: .buildkite/scripts/steps/functional/security_solution_investigations.sh
- command: .buildkite/scripts/steps/functional/security_cypress_exec.sh
env:
TARGET: cypress:investigations:run:ess
ROOT_DIR: x-pack/test/security_solution_cypress
JOB_TITLE: kibana-security-solution-chrome
MSG: "--- Investigations - Security Solution Cypress Tests"
label: 'Investigations - Security Solution Cypress Tests'
agents:
queue: n2-4-spot
@ -199,7 +249,12 @@ steps:
- exit_status: '*'
limit: 1
- command: .buildkite/scripts/steps/functional/defend_workflows.sh
- command: .buildkite/scripts/steps/functional/security_cypress_exec.sh
env:
TARGET: cypress:dw:run
ROOT_DIR: x-pack/plugins/security_solution
JOB_TITLE: kibana-defend-workflows-cypress
MSG: "--- Defend Workflows Cypress tests"
label: 'Defend Workflows Cypress Tests'
agents:
queue: n2-4-virt
@ -211,7 +266,12 @@ steps:
- exit_status: '*'
limit: 1
- command: .buildkite/scripts/steps/functional/defend_workflows_serverless.sh
- command: .buildkite/scripts/steps/functional/security_cypress_exec.sh
env:
TARGET: cypress:dw:serverless:run
ROOT_DIR: x-pack/plugins/security_solution
JOB_TITLE: kibana-defend-workflows-serverless-cypress
MSG: "--- Defend Workflows Cypress tests on Serverless"
label: 'Defend Workflows Cypress Tests on Serverless'
agents:
queue: n2-4-virt
@ -223,7 +283,12 @@ steps:
- exit_status: '*'
limit: 1
- command: .buildkite/scripts/steps/functional/threat_intelligence.sh
- command: .buildkite/scripts/steps/functional/security_cypress_exec.sh
env:
TARGET: cypress:run
ROOT_DIR: x-pack/plugins/threat_intelligence
JOB_TITLE: kibana-threat-intelligence-chrome
MSG: "--- Threat Intelligence Cypress tests (Chrome)"
label: 'Threat Intelligence Cypress Tests'
agents:
queue: n2-4-spot

View file

@ -57,7 +57,12 @@ steps:
- exit_status: '*'
limit: 1
- command: .buildkite/scripts/steps/functional/security_serverless.sh
- command: .buildkite/scripts/steps/functional/security_cypress_exec.sh
env:
TARGET: cypress:run:serverless
ROOT_DIR: x-pack/test/security_solution_cypress
JOB_TITLE: kibana-serverless-security-cypress
MSG: "--- Security Serverless Cypress Tests"
label: 'Serverless Security Cypress Tests'
agents:
queue: n2-4-spot
@ -69,8 +74,13 @@ steps:
- exit_status: '*'
limit: 1
- command: .buildkite/scripts/steps/functional/security_serverless_explore.sh
label: 'Serverless Explore - Security Solution Cypress Tests'
- command: .buildkite/scripts/steps/functional/security_cypress_exec.sh
env:
TARGET: cypress:explore:run:serverless
ROOT_DIR: x-pack/test/security_solution_cypress
JOB_TITLE: kibana-security-solution-chrome
MSG: "--- Serverless Explore - Security Cypress Tests"
label: 'Serverless Explore - Security Cypress Tests'
agents:
queue: n2-4-spot
depends_on: build
@ -81,8 +91,13 @@ steps:
- exit_status: '*'
limit: 1
- command: .buildkite/scripts/steps/functional/security_serverless_investigations.sh
label: 'Serverless Investigations - Security Solution Cypress Tests'
- command: .buildkite/scripts/steps/functional/security_cypress_exec.sh
env:
TARGET: cypress:investigations:run:serverless
ROOT_DIR: x-pack/test/security_solution_cypress
JOB_TITLE: kibana-security-solution-chrome
MSG: "--- Serverless Investigations - Security Cypress Tests"
label: 'Serverless Investigations - Security Cypress Tests'
agents:
queue: n2-4-spot
depends_on: build
@ -93,8 +108,13 @@ steps:
- exit_status: '*'
limit: 1
- command: .buildkite/scripts/steps/functional/security_serverless_rule_management.sh
label: 'Serverless Rule Management - Security Solution Cypress Tests'
- command: .buildkite/scripts/steps/functional/security_cypress_exec.sh
env:
TARGET: cypress:rule_management:run:serverless
ROOT_DIR: x-pack/test/security_solution_cypress
JOB_TITLE: kibana-security-solution-chrome
MSG: "--- Serverless Rule Management - Security Cypress Tests "
label: 'Serverless Rule Management - Security Cypress Tests'
agents:
queue: n2-4-spot
depends_on: build
@ -105,8 +125,13 @@ steps:
- exit_status: '*'
limit: 1
- command: .buildkite/scripts/steps/functional/security_serverless_rule_management_prebuilt_rules.sh
label: 'Serverless Rule Management - Prebuilt Rules - Security Solution Cypress Tests'
- command: .buildkite/scripts/steps/functional/security_cypress_exec.sh
env:
TARGET: cypress:rule_management:prebuilt_rules:run:serverless
ROOT_DIR: x-pack/test/security_solution_cypress
JOB_TITLE: kibana-security-solution-chrome
MSG: "--- Rule Management - Prebuilt Rules - Security Cypress Tests"
label: 'Rule Management - Prebuilt Rules - Security Cypress Tests'
agents:
queue: n2-4-spot
depends_on: build
@ -117,7 +142,12 @@ steps:
- exit_status: '*'
limit: 1
- command: .buildkite/scripts/steps/functional/security_solution.sh
- command: .buildkite/scripts/steps/functional/security_cypress_exec.sh
env:
TARGET: cypress:run:ess
ROOT_DIR: x-pack/test/security_solution_cypress
JOB_TITLE: kibana-security-solution-chrome
MSG: "--- Security Solution Cypress tests (Chrome)"
label: 'Security Solution Cypress Tests'
agents:
queue: n2-4-spot
@ -129,7 +159,12 @@ steps:
- exit_status: '*'
limit: 1
- command: .buildkite/scripts/steps/functional/security_solution_explore.sh
- command: .buildkite/scripts/steps/functional/security_cypress_exec.sh
env:
TARGET: cypress:explore:run:ess
ROOT_DIR: x-pack/test/security_solution_cypress
JOB_TITLE: kibana-security-solution-chrome
MSG: "--- Explore Cypress Tests on Security Solution"
label: 'Explore - Security Solution Cypress Tests'
agents:
queue: n2-4-spot
@ -141,7 +176,12 @@ steps:
- exit_status: '*'
limit: 1
- command: .buildkite/scripts/steps/functional/security_solution_rule_management.sh
- command: .buildkite/scripts/steps/functional/security_cypress_exec.sh
env:
TARGET: cypress:rule_management:run:ess
ROOT_DIR: x-pack/test/security_solution_cypress
JOB_TITLE: kibana-security-solution-chrome
MSG: "--- Rule Management - Security Solution Cypress Tests"
label: 'Rule Management - Security Solution Cypress Tests'
agents:
queue: n2-4-spot
@ -153,7 +193,12 @@ steps:
- exit_status: '*'
limit: 1
- command: .buildkite/scripts/steps/functional/security_solution_rule_management_prebuilt_rules.sh
- command: .buildkite/scripts/steps/functional/security_cypress_exec.sh
env:
TARGET: cypress:rule_management:prebuilt_rules:run:ess
ROOT_DIR: x-pack/test/security_solution_cypress
JOB_TITLE: kibana-security-solution-chrome
MSG: "--- Rule Management - Prebuilt Rules - Security Solution Cypress Tests"
label: 'Rule Management - Prebuilt Rules - Security Solution Cypress Tests'
agents:
queue: n2-4-spot
@ -165,7 +210,12 @@ steps:
- exit_status: '*'
limit: 1
- command: .buildkite/scripts/steps/functional/security_solution_investigations.sh
- command: .buildkite/scripts/steps/functional/security_cypress_exec.sh
env:
TARGET: cypress:investigations:run:ess
ROOT_DIR: x-pack/test/security_solution_cypress
JOB_TITLE: kibana-security-solution-chrome
MSG: "--- Investigations - Security Solution Cypress Tests"
label: 'Investigations - Security Solution Cypress Tests'
agents:
queue: n2-4-spot
@ -177,7 +227,12 @@ steps:
- exit_status: '*'
limit: 1
- command: .buildkite/scripts/steps/functional/defend_workflows.sh
- command: .buildkite/scripts/steps/functional/security_cypress_exec.sh
env:
TARGET: cypress:dw:run
ROOT_DIR: x-pack/plugins/security_solution
JOB_TITLE: kibana-defend-workflows-cypress
MSG: "--- Defend Workflows Cypress tests"
label: 'Defend Workflows Cypress Tests'
agents:
queue: n2-4-virt
@ -189,7 +244,12 @@ steps:
- exit_status: '*'
limit: 1
- command: .buildkite/scripts/steps/functional/defend_workflows_serverless.sh
- command: .buildkite/scripts/steps/functional/security_cypress_exec.sh
env:
TARGET: cypress:dw:serverless:run
ROOT_DIR: x-pack/plugins/security_solution
JOB_TITLE: kibana-defend-workflows-serverless-cypress
MSG: "--- Defend Workflows Cypress tests on Serverless"
label: 'Defend Workflows Cypress Tests on Serverless'
agents:
queue: n2-4-virt
@ -201,7 +261,12 @@ steps:
- exit_status: '*'
limit: 1
- command: .buildkite/scripts/steps/functional/threat_intelligence.sh
- command: .buildkite/scripts/steps/functional/security_cypress_exec.sh
env:
TARGET: cypress:run
ROOT_DIR: x-pack/plugins/threat_intelligence
JOB_TITLE: kibana-threat-intelligence-chrome
MSG: "--- Threat Intelligence Cypress tests (Chrome)"
label: 'Threat Intelligence Cypress Tests'
agents:
queue: n2-4-spot
@ -238,7 +303,12 @@ steps:
limit: 1
# status_exception: Native role management is not enabled in this Elasticsearch instance
# - command: .buildkite/scripts/steps/functional/security_serverless_defend_workflows.sh
# - command: .buildkite/scripts/steps/functional/security_cypress_exec.sh
# env:
# TARGET: cypress:run
# ROOT_DIR: x-pack/test_serverless/functional/test_suites/security/cypress
# JOB_TITLE: kibana-serverless-security-cypress
# MSG: "--- Security Defend Workflows Serverless Cypress"
# label: 'Serverless Security Defend Workflows Cypress Tests'
# agents:
# queue: n2-4-spot

View file

@ -1,16 +0,0 @@
#!/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-defend-workflows-cypress
export KIBANA_INSTALL_DIR=${KIBANA_BUILD_LOCATION}
echo "--- Defend Workflows Cypress tests"
cd x-pack/plugins/security_solution
set +e
yarn cypress:dw:run; status=$?; yarn junit:merge || :; exit $status

View file

@ -1,16 +0,0 @@
#!/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-defend-workflows-serverless-cypress
export KIBANA_INSTALL_DIR=${KIBANA_BUILD_LOCATION}
echo "--- Defend Workflows Cypress tests on Serverless"
cd x-pack/plugins/security_solution
set +e
yarn cypress:dw:serverless:run; status=$?; yarn junit:merge || :; exit $status

View file

@ -0,0 +1,26 @@
#!/usr/bin/env bash
set -euo pipefail
source .buildkite/scripts/steps/functional/common.sh
source .buildkite/scripts/steps/functional/common_cypress.sh
export JOB=$JOB_TITLE
export KIBANA_INSTALL_DIR=${KIBANA_BUILD_LOCATION}
echo $MSG
cd $ROOT_DIR
TARGETS_ARRAY=$(jq .scripts package.json | jq 'keys')
if [[ " ${TARGETS_ARRAY[*]} " == *"$TARGET"* ]]; then
echo "Target '$TARGET' exists in the available targets in package.json"
echo "Proceeding in test run!"
else
echo "The provided target '$TARGET' could not be found in the available targets in package.json"
echo "Abort the test runtime due to unexpected target script"
exit 1
fi
set +e
yarn $TARGET; status=$?; yarn junit:merge || :; exit $status

View file

@ -1,16 +0,0 @@
#!/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 Serverless Cypress Tests"
cd x-pack/test/security_solution_cypress
set +e
yarn cypress:run:serverless; status=$?; yarn junit:merge || :; exit $status

View file

@ -1,13 +0,0 @@
#!/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

View file

@ -1,16 +0,0 @@
#!/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 - Security Solution Cypress Tests"
cd x-pack/test/security_solution_cypress
set +e
yarn cypress:explore:run:serverless; status=$?; yarn junit:merge || :; exit $status

View file

@ -1,16 +0,0 @@
#!/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"
cd x-pack/test/security_solution_cypress
set +e
yarn cypress:investigations:run:serverless; status=$?; yarn junit:merge || :; exit $status

View file

@ -1,16 +0,0 @@
#!/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 "--- Rule Management Cypress Tests on Serverless"
cd x-pack/test/security_solution_cypress
set +e
yarn cypress:rule_management:run:serverless; status=$?; yarn junit:merge || :; exit $status

View file

@ -1,16 +0,0 @@
#!/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 "--- Rule Management - Prebuilt Rules - Cypress Tests on Serverless"
cd x-pack/test/security_solution_cypress
set +e
yarn cypress:rule_management:prebuilt_rules:run:serverless; status=$?; yarn junit:merge || :; exit $status

View file

@ -1,16 +0,0 @@
#!/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 "--- Security Solution Cypress tests (Chrome)"
cd x-pack/test/security_solution_cypress
set +e
yarn cypress:run:ess; status=$?; yarn junit:merge || :; exit $status

View file

@ -1,16 +0,0 @@
#!/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 Security Solution"
cd x-pack/test/security_solution_cypress
set +e
yarn cypress:explore:run:ess; status=$?; yarn junit:merge || :; exit $status

View file

@ -1,16 +0,0 @@
#!/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 - Security Solution Cypress Tests"
cd x-pack/test/security_solution_cypress
set +e
yarn cypress:investigations:run:ess; status=$?; yarn junit:merge || :; exit $status

View file

@ -1,16 +0,0 @@
#!/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 "--- Rule Management - Security Solution Cypress Tests"
cd x-pack/test/security_solution_cypress
set +e
yarn cypress:rule_management:run:ess; status=$?; yarn junit:merge || :; exit $status

View file

@ -1,16 +0,0 @@
#!/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 "--- Rule Management - Prebuilt Rules - Security Solution Cypress Tests"
cd x-pack/test/security_solution_cypress
set +e
yarn cypress:rule_management:prebuilt_rules:run:ess; status=$?; yarn junit:merge || :; exit $status

View file

@ -1,13 +0,0 @@
#!/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-threat-intelligence-chrome
export KIBANA_INSTALL_DIR=${KIBANA_BUILD_LOCATION}
echo "--- Threat Intelligence Cypress tests (Chrome)"
yarn --cwd x-pack/plugins/threat_intelligence cypress:run