Skip to content

Commit

Permalink
feat(roll): roll to ToT Playwright (17-05-24) (#1386)
Browse files Browse the repository at this point in the history
  • Loading branch information
playwrightmachine committed May 17, 2024
1 parent 7856785 commit bfefdc2
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion dotnet/docs/ci-intro.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ jobs:
name: 'Playwright Tests'
runs-on: ubuntu-latest
container:
image: mcr.microsoft.com/playwright/dotnet:v1.43.0-jammy
image: mcr.microsoft.com/playwright/dotnet:v1.44.0-jammy
steps:
- uses: actions/checkout@v4
- name: Setup dotnet
Expand Down
8 changes: 4 additions & 4 deletions dotnet/docs/ci.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ trigger:

pool:
vmImage: ubuntu-latest
container: mcr.microsoft.com/playwright/dotnet:v1.43.0-jammy
container: mcr.microsoft.com/playwright/dotnet:v1.44.0-jammy

steps:
- task: UseDotNet@2
Expand All @@ -102,7 +102,7 @@ Running Playwright on CircleCI is very similar to running on GitHub Actions. In
executors:
pw-jammy-development:
docker:
- image: mcr.microsoft.com/playwright/dotnet:v1.43.0-jammy
- image: mcr.microsoft.com/playwright/dotnet:v1.44.0-jammy
```

Note: When using the docker agent definition, you are specifying the resource class of where playwright runs to the 'medium' tier [here](https://circleci.com/docs/configuration-reference?#docker-execution-environment). The default behavior of Playwright is to set the number of workers to the detected core count (2 in the case of the medium tier). Overriding the number of workers to greater than this number will cause unnecessary timeouts and failures.
Expand All @@ -113,7 +113,7 @@ Jenkins supports Docker agents for pipelines. Use the [Playwright Docker image](

```groovy
pipeline {
agent { docker { image 'mcr.microsoft.com/playwright/dotnet:v1.43.0-jammy' } }
agent { docker { image 'mcr.microsoft.com/playwright/dotnet:v1.44.0-jammy' } }
stages {
stage('e2e-tests') {
steps {
Expand All @@ -130,7 +130,7 @@ pipeline {
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.mdx)).

```yml
image: mcr.microsoft.com/playwright/dotnet:v1.43.0-jammy
image: mcr.microsoft.com/playwright/dotnet:v1.44.0-jammy
```

### GitLab CI
Expand Down
12 changes: 6 additions & 6 deletions dotnet/docs/docker.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ This Docker image is intended to be used for testing and development purposes on
### Pull the image

```bash
docker pull mcr.microsoft.com/playwright/dotnet:v1.43.0-jammy
docker pull mcr.microsoft.com/playwright/dotnet:v1.44.0-jammy
```

### Run the image
Expand All @@ -33,15 +33,15 @@ By default, the Docker image will use the `root` user to run the browsers. This
On trusted websites, you can avoid creating a separate user and use root for it since you trust the code which will run on the browsers.

```bash
docker run -it --rm --ipc=host mcr.microsoft.com/playwright/dotnet:v1.43.0-jammy /bin/bash
docker run -it --rm --ipc=host mcr.microsoft.com/playwright/dotnet:v1.44.0-jammy /bin/bash
```

#### Crawling and scraping

On untrusted websites, it's recommended to use a separate user for launching the browsers in combination with the seccomp profile. Inside the container or if you are using the Docker image as a base image you have to use `adduser` for it.

```bash
docker run -it --rm --ipc=host --user pwuser --security-opt seccomp=seccomp_profile.json mcr.microsoft.com/playwright/dotnet:v1.43.0-jammy /bin/bash
docker run -it --rm --ipc=host --user pwuser --security-opt seccomp=seccomp_profile.json mcr.microsoft.com/playwright/dotnet:v1.44.0-jammy /bin/bash
```

[`seccomp_profile.json`](https://github.com/microsoft/playwright/blob/main/utils/docker/seccomp_profile.json) is needed to run Chromium with sandbox. This is a [default Docker seccomp profile](https://github.com/docker/engine/blob/d0d99b04cf6e00ed3fc27e81fc3d94e7eda70af3/profiles/seccomp/default.json) with extra user namespace cloning permissions:
Expand Down Expand Up @@ -76,9 +76,9 @@ See [all available image tags].
We currently publish images with the following tags:
- `:next` - tip-of-tree image version based on Ubuntu 22.04 LTS (Jammy Jellyfish).
- `:next-jammy` - tip-of-tree image version based on Ubuntu 22.04 LTS (Jammy Jellyfish).
- `:v1.43.0` - Playwright v1.43.0 release docker image based on Ubuntu 22.04 LTS (Jammy Jellyfish).
- `:v1.43.0-jammy` - Playwright v1.43.0 release docker image based on Ubuntu 22.04 LTS (Jammy Jellyfish).
- `:v1.43.0-focal` - Playwright v1.43.0 release docker image based on Ubuntu 20.04 LTS (Focal Fossa).
- `:v1.44.0` - Playwright v1.44.0 release docker image based on Ubuntu 22.04 LTS (Jammy Jellyfish).
- `:v1.44.0-jammy` - Playwright v1.44.0 release docker image based on Ubuntu 22.04 LTS (Jammy Jellyfish).
- `:v1.44.0-focal` - Playwright v1.44.0 release docker image based on Ubuntu 20.04 LTS (Focal Fossa).

:::note
It is recommended to always pin your Docker image to a specific version if possible. If the Playwright version in your Docker image does not match the version in your project/tests, Playwright will be unable to locate browser executables.
Expand Down

0 comments on commit bfefdc2

Please sign in to comment.