-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ftr] rework ciGroup validation to remove JOBS.yml and avoid duplicat…
…ion (#109149) Co-authored-by: spalger <[email protected]> # Conflicts: # .ci/jobs.yml # test/scripts/jenkins_code_coverage.sh
- Loading branch information
Showing
15 changed files
with
100 additions
and
115 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
root: | ||
- ciGroup1 | ||
- ciGroup2 | ||
- ciGroup3 | ||
- ciGroup4 | ||
- ciGroup5 | ||
- ciGroup6 | ||
- ciGroup7 | ||
- ciGroup8 | ||
- ciGroup9 | ||
- ciGroup10 | ||
- ciGroup11 | ||
- ciGroup12 | ||
|
||
xpack: | ||
- ciGroup1 | ||
- ciGroup2 | ||
- ciGroup3 | ||
- ciGroup4 | ||
- ciGroup5 | ||
- ciGroup6 | ||
- ciGroup7 | ||
- ciGroup8 | ||
- ciGroup9 | ||
- ciGroup10 | ||
- ciGroup11 | ||
- ciGroup12 | ||
- ciGroup13 | ||
- ciGroupDocker |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
/* | ||
* 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 and the Server Side Public License, v 1; you may not use this file except | ||
* in compliance with, at your election, the Elastic License 2.0 or the Server | ||
* Side Public License, v 1. | ||
*/ | ||
|
||
import Path from 'path'; | ||
import Fs from 'fs/promises'; | ||
|
||
import execa from 'execa'; | ||
import { safeLoad } from 'js-yaml'; | ||
|
||
import { run, REPO_ROOT } from '@kbn/dev-utils'; | ||
import { schema } from '@kbn/config-schema'; | ||
|
||
const RELATIVE_JOBS_YAML_PATH = '.ci/ci_groups.yml'; | ||
const JOBS_YAML_PATH = Path.resolve(REPO_ROOT, RELATIVE_JOBS_YAML_PATH); | ||
const SCHEMA = schema.object({ | ||
root: schema.arrayOf(schema.string()), | ||
xpack: schema.arrayOf(schema.string()), | ||
}); | ||
|
||
export function runEnsureAllTestsInCiGroupsCli() { | ||
run(async ({ log }) => { | ||
const { root, xpack } = SCHEMA.validate(safeLoad(await Fs.readFile(JOBS_YAML_PATH, 'utf-8'))); | ||
|
||
log.info( | ||
'validating root tests directory contains all "root" ciGroups from', | ||
RELATIVE_JOBS_YAML_PATH | ||
); | ||
await execa(process.execPath, [ | ||
'scripts/functional_tests', | ||
...root.map((tag) => `--include-tag=${tag}`), | ||
'--include-tag=runOutsideOfCiGroups', | ||
'--assert-none-excluded', | ||
]); | ||
|
||
log.info( | ||
'validating x-pack/tests directory contains all "xpack" ciGroups from', | ||
RELATIVE_JOBS_YAML_PATH | ||
); | ||
await execa(process.execPath, [ | ||
'x-pack/scripts/functional_tests', | ||
...xpack.map((tag) => `--include-tag=${tag}`), | ||
'--assert-none-excluded', | ||
]); | ||
|
||
log.success('all tests are in a valid ciGroup'); | ||
}); | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters