Skip to content

Commit

Permalink
[Security Solution][CI Stats] - Add cypress tests to flaky test runner (
Browse files Browse the repository at this point in the history
#127293) (#127491)

(cherry picked from commit 2dc753b)

Co-authored-by: Michael Olorunnisola <[email protected]>
  • Loading branch information
kibanamachine and michaelolo24 authored Mar 10, 2022
1 parent ac5aab4 commit 1b8bb14
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .buildkite/pipelines/flaky_tests/groups.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,18 @@
"key": "oss/accessibility",
"name": "OSS Accessibility"
},
{
"key": "xpack/cypress/security_solution",
"name": "Security Solution - Cypress"
},
{
"key": "xpack/cypress/osquery_cypress",
"name": "Osquery - Cypress"
},
{
"key": "xpack/cypress/fleet_cypress",
"name": "Fleet - Cypress"
},
{
"key": "xpack/cigroup",
"name": "Default CI Group",
Expand Down
21 changes: 21 additions & 0 deletions .buildkite/pipelines/flaky_tests/runner.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
*/

const { execSync } = require('child_process');
const groups = /** @type {Array<{key: string, name: string, ciGroups: number }>} */ (
require('./groups.json').groups
);

const concurrency = 25;
const defaultCount = concurrency * 2;
Expand Down Expand Up @@ -183,6 +186,24 @@ for (const testSuite of testSuites) {
concurrency_group: UUID,
concurrency_method: 'eager',
});
case 'cypress':
const CYPRESS_SUITE = CI_GROUP;
const group = groups.find((group) => group.key.includes(CYPRESS_SUITE));
if (!group) {
throw new Error(
`Group configuration was not found in groups.json for the following cypress suite: {${CYPRESS_SUITE}}.`
);
}
steps.push({
command: `.buildkite/scripts/steps/functional/${CYPRESS_SUITE}.sh`,
label: group.name,
agents: { queue: 'ci-group-6' },
depends_on: 'build',
parallelism: RUN_COUNT,
concurrency: concurrency,
concurrency_group: UUID,
concurrency_method: 'eager',
});
break;
}
}
Expand Down

0 comments on commit 1b8bb14

Please sign in to comment.