mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 09:19:04 -04:00
(cherry picked from commit 8771527334
)
# Conflicts:
# .buildkite/pipelines/pull_request/response_ops.yml
# .buildkite/scripts/pipelines/pull_request/pipeline.js
# x-pack/test/security_solution_cypress/runner.ts
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
parent
b5df7cfa97
commit
64e69c8902
7 changed files with 102 additions and 3 deletions
11
.buildkite/pipelines/pull_request/response_ops.yml
Normal file
11
.buildkite/pipelines/pull_request/response_ops.yml
Normal file
|
@ -0,0 +1,11 @@
|
|||
steps:
|
||||
- command: .buildkite/scripts/steps/functional/response_ops.sh
|
||||
label: 'Rules, Alerts and Exceptions ResponseOps Cypress Tests on Security Solution'
|
||||
agents:
|
||||
queue: ci-group-6
|
||||
depends_on: build
|
||||
timeout_in_minutes: 120
|
||||
retry:
|
||||
automatic:
|
||||
- exit_status: '*'
|
||||
limit: 1
|
11
.buildkite/pipelines/pull_request/response_ops_cases.yml
Normal file
11
.buildkite/pipelines/pull_request/response_ops_cases.yml
Normal file
|
@ -0,0 +1,11 @@
|
|||
steps:
|
||||
- command: .buildkite/scripts/steps/functional/response_ops_cases.sh
|
||||
label: 'Cases Cypress Tests on Security Solution'
|
||||
agents:
|
||||
queue: ci-group-6
|
||||
depends_on: build
|
||||
timeout_in_minutes: 120
|
||||
retry:
|
||||
automatic:
|
||||
- exit_status: '*'
|
||||
limit: 1
|
|
@ -65,19 +65,32 @@ const uploadPipeline = (pipelineContent) => {
|
|||
|
||||
if (
|
||||
(await doAnyChangesMatch([
|
||||
/^x-pack\/plugins\/security_solution/,
|
||||
/^x-pack\/plugins\/cases/,
|
||||
/^x-pack\/plugins\/lists/,
|
||||
/^x-pack\/plugins\/security_solution/,
|
||||
/^x-pack\/plugins\/timelines/,
|
||||
/^x-pack\/test\/security_solution_cypress/,
|
||||
/^x-pack\/plugins\/triggers_actions_ui\/public\/application\/sections\/action_connector_form/,
|
||||
/^x-pack\/plugins\/triggers_actions_ui\/public\/application\/context\/actions_connectors_context\.tsx/,
|
||||
/^x-pack\/test\/security_solution_cypress/,
|
||||
])) ||
|
||||
process.env.GITHUB_PR_LABELS.includes('ci:all-cypress-suites')
|
||||
) {
|
||||
pipeline.push(getPipeline('.buildkite/pipelines/pull_request/security_solution.yml'));
|
||||
}
|
||||
|
||||
if (
|
||||
(await doAnyChangesMatch([
|
||||
/^src\/plugins\/data/,
|
||||
/^x-pack\/plugins\/actions/,
|
||||
/^x-pack\/plugins\/alerting/,
|
||||
/^x-pack\/plugins\/event_log/,
|
||||
/^x-pack\/plugins\/rule_registry/,
|
||||
/^x-pack\/plugins\/task_manager/,
|
||||
])) ||
|
||||
process.env.GITHUB_PR_LABELS.includes('ci:all-cypress-suites')
|
||||
) {
|
||||
pipeline.push(getPipeline('.buildkite/pipelines/pull_request/response_ops.yml'));
|
||||
}
|
||||
|
||||
if (
|
||||
(await doAnyChangesMatch([/^x-pack\/plugins\/apm/])) ||
|
||||
process.env.GITHUB_PR_LABELS.includes('ci:all-cypress-suites')
|
||||
|
|
17
.buildkite/scripts/steps/functional/response_ops.sh
Executable file
17
.buildkite/scripts/steps/functional/response_ops.sh
Executable file
|
@ -0,0 +1,17 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
source .buildkite/scripts/steps/functional/common.sh
|
||||
|
||||
export JOB=kibana-security-solution-chrome
|
||||
|
||||
echo "--- Response Ops Cypress Tests on Security Solution"
|
||||
|
||||
cd "$XPACK_DIR"
|
||||
|
||||
checks-reporter-with-killswitch "Response Ops Cypress Tests on Security Solution" \
|
||||
node scripts/functional_tests \
|
||||
--debug --bail \
|
||||
--kibana-install-dir "$KIBANA_BUILD_LOCATION" \
|
||||
--config test/security_solution_cypress/response_ops_cli_config.ts
|
|
@ -15,6 +15,7 @@
|
|||
"cypress:run": "yarn cypress:run:reporter --browser chrome --spec './cypress/integration/**/*.spec.ts'; status=$?; yarn junit:merge && exit $status",
|
||||
"cypress:run:firefox": "yarn cypress:run:reporter --browser firefox --spec './cypress/integration/**/*.spec.ts'; status=$?; yarn junit:merge && exit $status",
|
||||
"cypress:run:reporter": "yarn cypress run --config-file ./cypress/cypress.json --reporter ../../../node_modules/cypress-multi-reporters --reporter-options configFile=./cypress/reporter_config.json",
|
||||
"cypress:run:respops": "yarn cypress:run:reporter --browser chrome --spec ./cypress/integration/detection_alerts/*.spec.ts,./cypress/integration/detection_rules/*.spec.ts,./cypress/integration/exceptions/*.spec.ts; status=$?; yarn junit:merge && exit $status",
|
||||
"cypress:run:ccs": "yarn cypress:run:reporter --browser chrome --config integrationFolder=./cypress/ccs_integration; status=$?; yarn junit:merge && exit $status",
|
||||
"cypress:run-as-ci": "node --max-old-space-size=2048 ../../../scripts/functional_tests --config ../../test/security_solution_cypress/cli_config.ts",
|
||||
"cypress:run-as-ci:firefox": "node --max-old-space-size=2048 ../../../scripts/functional_tests --config ../../test/security_solution_cypress/config.firefox.ts",
|
||||
|
|
|
@ -0,0 +1,19 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
import { FtrConfigProviderContext } from '@kbn/test';
|
||||
|
||||
import { SecuritySolutionCypressCliResponseOpsTestRunner } from './runner';
|
||||
|
||||
export default async function ({ readConfigFile }: FtrConfigProviderContext) {
|
||||
const securitySolutionCypressConfig = await readConfigFile(require.resolve('./config.ts'));
|
||||
return {
|
||||
...securitySolutionCypressConfig.getAll(),
|
||||
|
||||
testRunner: SecuritySolutionCypressCliResponseOpsTestRunner,
|
||||
};
|
||||
}
|
|
@ -37,6 +37,33 @@ export async function SecuritySolutionCypressCliTestRunner({ getService }: FtrPr
|
|||
});
|
||||
}
|
||||
|
||||
export async function SecuritySolutionCypressCliResponseOpsTestRunner({
|
||||
getService,
|
||||
}: FtrProviderContext) {
|
||||
const log = getService('log');
|
||||
const config = getService('config');
|
||||
const esArchiver = getService('esArchiver');
|
||||
|
||||
await esArchiver.load('x-pack/test/security_solution_cypress/es_archives/auditbeat');
|
||||
|
||||
await withProcRunner(log, async (procs) => {
|
||||
await procs.run('cypress', {
|
||||
cmd: 'yarn',
|
||||
args: ['cypress:run:respops'],
|
||||
cwd: resolve(__dirname, '../../plugins/security_solution'),
|
||||
env: {
|
||||
FORCE_COLOR: '1',
|
||||
CYPRESS_BASE_URL: Url.format(config.get('servers.kibana')),
|
||||
CYPRESS_ELASTICSEARCH_URL: Url.format(config.get('servers.elasticsearch')),
|
||||
CYPRESS_ELASTICSEARCH_USERNAME: config.get('servers.elasticsearch.username'),
|
||||
CYPRESS_ELASTICSEARCH_PASSWORD: config.get('servers.elasticsearch.password'),
|
||||
...process.env,
|
||||
},
|
||||
wait: true,
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
export async function SecuritySolutionCypressCliFirefoxTestRunner({
|
||||
getService,
|
||||
}: FtrProviderContext) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue