Skip to content

Commit

Permalink
update pipeline script
Browse files Browse the repository at this point in the history
  • Loading branch information
dmlemeshko committed Dec 9, 2024
1 parent 7fb9639 commit 2b49bff
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 24 deletions.
2 changes: 1 addition & 1 deletion .buildkite/scripts/pipelines/pull_request/pipeline.ts
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ const getPipeline = (filename: string, removeSteps = true) => {
/^x-pack\/plugins\/discover_enhanced\/ui_tests/,
/^packages\/kbn-scout/,
])) ||
GITHUB_PR_LABELS.includes('ci:scout-tests')
GITHUB_PR_LABELS.includes('ci:scout-ui-tests')
) {
pipeline.push(getPipeline('.buildkite/pipelines/pull_request/scout_ui_tests.yml'));
}
Expand Down
48 changes: 25 additions & 23 deletions .buildkite/scripts/steps/functional/scout_ui_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,28 @@ source .buildkite/scripts/steps/functional/common.sh

export JOB=kibana-scout-ui-tests

echo "--- Stateful: 'discover_enhanced' plugin UI Tests"
node scripts/scout run-tests \
--stateful \
--config x-pack/plugins/discover_enhanced/ui_tests/playwright.config.ts \
--kibana-install-dir "$KIBANA_BUILD_LOCATION"

echo "--- Serverless Elasticsearch: 'discover_enhanced' plugin UI Tests"
node scripts/scout run-tests \
--serverless=es \
--config x-pack/plugins/discover_enhanced/ui_tests/playwright.config.ts \
--kibana-install-dir "$KIBANA_BUILD_LOCATION"

echo "--- Serverless Observability: 'discover_enhanced' plugin UI Tests"
node scripts/scout run-tests \
--serverless=oblt \
--config x-pack/plugins/discover_enhanced/ui_tests/playwright.config.ts \
--kibana-install-dir "$KIBANA_BUILD_LOCATION"

echo "--- Serverless Security: 'discover_enhanced' plugin UI Tests"
node scripts/scout run-tests \
--serverless=security \
--config x-pack/plugins/discover_enhanced/ui_tests/playwright.config.ts \
--kibana-install-dir "$KIBANA_BUILD_LOCATION"
echo "--- Running 'discover_enhanced' plugin UI Tests"

TEST_CONFIG="x-pack/plugins/discover_enhanced/ui_tests/playwright.config.ts"
KIBANA_DIR="$KIBANA_BUILD_LOCATION"

declare -A TESTS=(
["Stateful"]="--stateful"
["Serverless Elasticsearch"]="--serverless=es"
["Serverless Observability"]="--serverless=oblt"
["Serverless Security"]="--serverless=security"
)

EXIT_CODE=0

for TEST_NAME in "${!TESTS[@]}"; do
echo "--- $TEST_NAME: 'discover_enhanced' plugin UI Tests"
if ! node scripts/scout run-tests ${TESTS[$TEST_NAME]} --config "$TEST_CONFIG" --kibana-install-dir "$KIBANA_DIR"; then
echo "--- $TEST_NAME: failed"
EXIT_CODE=1
else
echo "--- $TEST_NAME: passed"
fi
done

exit $EXIT_CODE

0 comments on commit 2b49bff

Please sign in to comment.