Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[buildkite] Add uptime playwright tests to PR pipeline #115590

Merged
merged 11 commits into from
Oct 20, 2021
11 changes: 11 additions & 0 deletions .buildkite/pipelines/pull_request/uptime.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
steps:
- command: .buildkite/scripts/steps/functional/uptime.sh
label: 'Uptime Playwright Tests'
brianseeders marked this conversation as resolved.
Show resolved Hide resolved
agents:
queue: ci-group-6
depends_on: build
timeout_in_minutes: 120
retry:
automatic:
- exit_status: '*'
limit: 1
4 changes: 4 additions & 0 deletions .buildkite/scripts/pipelines/pull_request/pipeline.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,10 @@ const uploadPipeline = (pipelineContent) => {
// pipeline.push(getPipeline('.buildkite/pipelines/pull_request/apm_cypress.yml'));
// }

if (await doAnyChangesMatch([/^x-pack\/plugins\/uptime/])) {
pipeline.push(getPipeline('.buildkite/pipelines/pull_request/uptime.yml'));
}

pipeline.push(getPipeline('.buildkite/pipelines/pull_request/post_build.yml'));

uploadPipeline(pipeline.join('\n'));
Expand Down
14 changes: 14 additions & 0 deletions .buildkite/scripts/steps/functional/uptime.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/usr/bin/env bash

set -euo pipefail

source .buildkite/scripts/steps/functional/common.sh

export JOB=kibana-uptime-playwright

echo "--- Uptime @elastic/synthetics Tests"

cd "$XPACK_DIR"

checks-reporter-with-killswitch "Uptime @elastic/synthetics Tests" \
node plugins/uptime/scripts/e2e.js
2 changes: 2 additions & 0 deletions x-pack/plugins/uptime/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,5 @@ module.exports = {
coverageReporters: ['text', 'html'],
collectCoverageFrom: ['<rootDir>/x-pack/plugins/uptime/{common,public,server}/**/*.{ts,tsx}'],
};

// TODO remove me after testing