forked from elastic/kibana
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[CI] automatically commit SO def change snapshot (elastic#169610)
Fix elastic#147935 Automatically run the SO def integration test, and commit the changes if any, as a new CI check script. As explained in the issue, this is just some DX improvement, avoiding for the developer the inconvenience of doing it manually every time they change or add a SO in any PR.
- Loading branch information
1 parent
9816126
commit c303263
Showing
4 changed files
with
32 additions
and
0 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
11 changes: 11 additions & 0 deletions
11
.buildkite/scripts/steps/checks/saved_objects_definition_change.sh
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,11 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -euo pipefail | ||
|
||
source .buildkite/scripts/common/util.sh | ||
|
||
echo --- Check SO definition changes | ||
cmd="node scripts/jest_integration -u src/core/server/integration_tests/ci_checks" | ||
|
||
eval "$cmd" | ||
check_for_changed_files "$cmd" true |
20 changes: 20 additions & 0 deletions
20
src/core/server/integration_tests/ci_checks/jest.integration.config.js
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,20 @@ | ||
/* | ||
* 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. | ||
*/ | ||
|
||
module.exports = { | ||
bail: true, // only report 1 issue | ||
// TODO replace the line below with | ||
// preset: '@kbn/test/jest_integration_node | ||
// to do so, we must fix all integration tests first | ||
// see https://github.com/elastic/kibana/pull/130255/ | ||
preset: '@kbn/test/jest_integration', | ||
rootDir: '../../../../..', | ||
roots: ['<rootDir>/src/core/server/integration_tests/ci_checks'], | ||
// must override to match all test given there is no `integration_tests` subfolder | ||
testMatch: ['**/*.test.{js,mjs,ts,tsx}'], | ||
}; |
File renamed without changes.