-
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.
Browse files
Browse the repository at this point in the history
# Backport This will backport the following commits from `main` to `8.x`: - [[scout] add ci pipeline (#202707)](#202707) <!--- Backport version: 8.9.8 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Dzmitry Lemechko","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-12-11T11:15:50Z","message":"[scout] add ci pipeline (#202707)\n\n## Summary\r\n\r\nAdding basic pipeline to run scout UI tests for stateful and 3\r\nserverless projects. Few tests were skipped for Security project because\r\nesArchives used in tests ingest index that are restricted for default\r\nproject roles.\r\n\r\nIt is an opt-in pipeline to verify kbn/scout changes does not break the\r\nexisting tests. It is only for start and we plan to re-work into a\r\nmature pipeline later.\r\n\r\nNew opt-in\r\n[pipeline](https://buildkite.com/elastic/kibana-pull-request/builds/258589#0193afc4-bbd6-4200-8c5f-a7e4a8073e1d)\r\nwas added\r\n<img width=\"1659\" alt=\"Screenshot 2024-12-10 at 11 31 35\"\r\nsrc=\"https://github.com/user-attachments/assets/1c19fa46-4e66-4796-ac6d-c2c96c74fa8e\">","sha":"87b2a12480c457ecb5ec9640c3e3ebc697edf0f7","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport:skip","v9.0.0","test:scout"],"number":202707,"url":"https://github.com/elastic/kibana/pull/202707","mergeCommit":{"message":"[scout] add ci pipeline (#202707)\n\n## Summary\r\n\r\nAdding basic pipeline to run scout UI tests for stateful and 3\r\nserverless projects. Few tests were skipped for Security project because\r\nesArchives used in tests ingest index that are restricted for default\r\nproject roles.\r\n\r\nIt is an opt-in pipeline to verify kbn/scout changes does not break the\r\nexisting tests. It is only for start and we plan to re-work into a\r\nmature pipeline later.\r\n\r\nNew opt-in\r\n[pipeline](https://buildkite.com/elastic/kibana-pull-request/builds/258589#0193afc4-bbd6-4200-8c5f-a7e4a8073e1d)\r\nwas added\r\n<img width=\"1659\" alt=\"Screenshot 2024-12-10 at 11 31 35\"\r\nsrc=\"https://github.com/user-attachments/assets/1c19fa46-4e66-4796-ac6d-c2c96c74fa8e\">","sha":"87b2a12480c457ecb5ec9640c3e3ebc697edf0f7"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","labelRegex":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/202707","number":202707,"mergeCommit":{"message":"[scout] add ci pipeline (#202707)\n\n## Summary\r\n\r\nAdding basic pipeline to run scout UI tests for stateful and 3\r\nserverless projects. Few tests were skipped for Security project because\r\nesArchives used in tests ingest index that are restricted for default\r\nproject roles.\r\n\r\nIt is an opt-in pipeline to verify kbn/scout changes does not break the\r\nexisting tests. It is only for start and we plan to re-work into a\r\nmature pipeline later.\r\n\r\nNew opt-in\r\n[pipeline](https://buildkite.com/elastic/kibana-pull-request/builds/258589#0193afc4-bbd6-4200-8c5f-a7e4a8073e1d)\r\nwas added\r\n<img width=\"1659\" alt=\"Screenshot 2024-12-10 at 11 31 35\"\r\nsrc=\"https://github.com/user-attachments/assets/1c19fa46-4e66-4796-ac6d-c2c96c74fa8e\">","sha":"87b2a12480c457ecb5ec9640c3e3ebc697edf0f7"}}]}] BACKPORT-->
- Loading branch information
1 parent
0f950a5
commit f0d24e4
Showing
21 changed files
with
292 additions
and
159 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,18 @@ | ||
steps: | ||
- command: .buildkite/scripts/steps/functional/scout_ui_tests.sh | ||
label: 'Scout UI Tests' | ||
agents: | ||
machineType: n2-standard-4 | ||
preemptible: true | ||
depends_on: | ||
- build | ||
- quick_checks | ||
- checks | ||
- linting | ||
- linting_with_types | ||
- check_types | ||
timeout_in_minutes: 30 | ||
retry: | ||
automatic: | ||
- exit_status: '-1' | ||
limit: 2 |
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,13 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -euo pipefail | ||
|
||
source .buildkite/scripts/steps/functional/common.sh | ||
|
||
export JOB=kibana-scout-ui-tests | ||
|
||
TEST_CONFIG="x-pack/plugins/discover_enhanced/ui_tests/playwright.config.ts" | ||
KIBANA_DIR="$KIBANA_BUILD_LOCATION" | ||
|
||
echo "--- Stateful: 'discover_enhanced' plugin UI Tests" | ||
node scripts/scout run-tests --stateful --config "$TEST_CONFIG" --kibana-install-dir "$KIBANA_DIR" |
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
35 changes: 35 additions & 0 deletions
35
packages/kbn-scout/src/playwright/fixtures/test/validate_tags.ts
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,35 @@ | ||
/* | ||
* 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", the "GNU Affero General Public License v3.0 only", 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", the "GNU Affero General Public | ||
* License v3.0 only", or the "Server Side Public License, v 1". | ||
*/ | ||
|
||
import { test as base } from '@playwright/test'; | ||
import { tags } from '../../tags'; | ||
|
||
const supportedTags = tags.DEPLOYMENT_AGNOSTIC; | ||
|
||
export const validateTagsFixture = base.extend<{ validateTags: void }>({ | ||
validateTags: [ | ||
async ({}, use, testInfo) => { | ||
if (testInfo.tags.length === 0) { | ||
throw new Error(`At least one tag is required: ${supportedTags.join(', ')}`); | ||
} | ||
|
||
const invalidTags = testInfo.tags.filter((tag: string) => !supportedTags.includes(tag)); | ||
if (invalidTags.length > 0) { | ||
throw new Error( | ||
`Unsupported tag(s) found in test suite "${testInfo.title}": ${invalidTags.join( | ||
', ' | ||
)}. ` + `Supported tags are: ${supportedTags.join(', ')}.` | ||
); | ||
} | ||
|
||
await use(); | ||
}, | ||
{ auto: true }, | ||
], | ||
}); |
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,27 @@ | ||
/* | ||
* 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", the "GNU Affero General Public License v3.0 only", 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", the "GNU Affero General Public | ||
* License v3.0 only", or the "Server Side Public License, v 1". | ||
*/ | ||
|
||
const SERVERLESS_ONLY = ['@svlSecurity', '@svlOblt', '@svlSearch']; | ||
const ESS_ONLY = ['@ess']; | ||
const DEPLOYMENT_AGNOSTIC = SERVERLESS_ONLY.concat(ESS_ONLY); | ||
|
||
export const tags = { | ||
ESS_ONLY, | ||
SERVERLESS_ONLY, | ||
DEPLOYMENT_AGNOSTIC, | ||
}; | ||
|
||
export const tagsByMode = { | ||
stateful: '@ess', | ||
serverless: { | ||
es: '@svlSearch', | ||
oblt: '@svlOblt', | ||
security: '@svlSecurity', | ||
}, | ||
}; |
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
Oops, something went wrong.