← Back to Discord Forum

[Solved] Running Playwright Java in air-gapped CI

Hi, we'd like to run our Playwright Junit test in an air-gapped CI, i.e. in a Jenkins that does not have access to the internet. This poses a problem when the Playwright Maven modules want to download the browsers from somewhere in the internet.

What we can do is to mirror Docker images in a custom Docker registry, so we could make the Playwright Docker image available to Jenkins. But then there doesn't seem to be a way to combine the Playwright Docker image with execution in Java?

Alternatively, would it make sense to build a custom Docker build image with the Playwright Docker image as base, and installing Java + Maven on top? Would the Playwright Maven plugins then find the existing Playwright installation within the same Docker image?

This thread is trying to answer question "How can Playwright Junit tests be run in an air-gapped CI, specifically in a Jenkins that does not have internet access?"

5 replies

Hm, I just discovered https://playwright.dev/java/docs/browsers#download-from-artifact-repository , but the docs don't say what kind of artifact repository is required to host the browser binaries?

I just see that the Docker image sets PLAYWRIGHT_BROWSERS_PATH to /ms-playwright , as documented in https://playwright.dev/java/docs/browsers#managing-browser-binaries , so I'd now go for the custom build image approach as Maven should be able to find the binaries in the image

OK I was totally off here, as I wasn't aware that there is a dedicated Playwright Java image that contains Maven and Java 🫣

So the answer is mcr.microsoft.com/playwright/java:v1.39.0-jammy (with "/java" in it)

[Solved] Running Playwright Java in air-gapped CI

Concerning the format of the binaries repository I opened this issue: https://github.com/microsoft/playwright-java/issues/1413

Related Discord Threads

AboutQuestionsDiscord ForumBrowser ExtensionTagsQA Jobs

Rayrun is a community for QA engineers. I am constantly looking for new ways to add value to people learning Playwright and other browser automation frameworks. If you have feedback, email luc@ray.run.