Skip to content

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.

docs(ci): add sample config for jenkins (#3398)

Arjun Attambe7db4d2c6d5
diff --git a/docs/ci.md b/docs/ci.md
index 819558b598..63643eb77f 100644
--- a/docs/ci.md
+++ b/docs/ci.md
@@ -11,6 +11,7 @@ configurations for common CI providers.
* [Azure Pipelines](#azure-pipelines)
* [Travis CI](#travis-ci)
* [CircleCI](#circleci)
+ * [Jenkins](#jenkins)
* [Bitbucket Pipelines](#bitbucket-pipelines)
* [GitLab CI](#gitlab-ci)
- [Caching browsers](#caching-browsers)
@@ -170,6 +171,25 @@ We run our tests on CircleCI, with our [pre-built Docker image](docker/README.md
This is likely caused by Jest autodetecting the number of processes on the entire machine (`36`) rather than the number allowed to your container (`2`). To fix this, set `jest --maxWorkers=2` in your test command.
+### Jenkins
+
+Jenkins supports Docker agents for pipelines. Use the [Playwright Docker image](docker/README.md)
+to run tests on Jenkins.
+
+```groovy
+pipeline {
+ agent { docker { image 'mcr.microsoft.com/playwright:bionic' } }
+ stages {
+ stage('e2e-tests') {
+ steps {
+ sh 'npm install'
+ sh 'npm run test'
+ }
+ }
+ }
+}
+```
+
### Bitbucket Pipelines
Bitbucket Pipelines can use public [Docker images as build environments](https://confluence.atlassian.com/bitbucket/use-docker-images-as-build-environments-792298897.html). To run Playwright tests on Bitbucket, use our public Docker image ([see Dockerfile](docker/README.md)).