attach-screenshots-from-journey-steps (#144447)

This commit is contained in:
Dzmitry Lemechko 2022-11-03 16:17:55 +01:00 committed by GitHub
parent 88815398e8
commit 1505c0688d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 2 deletions

View file

@ -119,6 +119,14 @@ while read -r journey; do
done
done <<< "$journeys"
echo "--- Upload journey step screenshots"
JOURNEY_SCREENSHOTS_DIR="${KIBANA_DIR}/data/journey_screenshots"
if [ -d "$JOURNEY_SCREENSHOTS_DIR" ]; then
cd "$JOURNEY_SCREENSHOTS_DIR"
buildkite-agent artifact upload "**/*fullscreen*.png"
cd "$KIBANA_DIR"
fi
echo "--- report/record failed journeys"
if [ "${failedJourneys[*]}" != "" ]; then
buildkite-agent meta-data set "failed-journeys" "$(printf "%s\n" "${failedJourneys[@]}")"

View file

@ -92,7 +92,7 @@ export class JourneyScreenshots {
await this.lock(async () => {
const filename = FtrScreenshotFilename.create(`${step.index}-${step.name}-failure`);
const fullscreenFilename = FtrScreenshotFilename.create(
`${step.index}-${step.name}-failure-fullscreen`
`${step.index}-${step.name.replace(/\s/g, '-')}-failure-fullscreen`
);
this.#manifest.steps.push({
type: 'failure',
@ -113,7 +113,7 @@ export class JourneyScreenshots {
await this.lock(async () => {
const filename = FtrScreenshotFilename.create(`${step.index}-${step.name}`);
const fullscreenFilename = FtrScreenshotFilename.create(
`${step.index}-${step.name}-fullscreen`
`${step.index}-${step.name.replace(/\s/g, '-')}-fullscreen`
);
this.#manifest.steps.push({
type: 'success',