From 4653824d88e3516ad31523f04d4d3e0cdcaf503d Mon Sep 17 00:00:00 2001 From: Yury Semikhatsky Date: Mon, 14 Sep 2026 16:04:30 -0700 Subject: [PATCH 1/9] chore: mark 1.63.0 (#1983) --- driver-bundle/pom.xml | 2 +- driver/pom.xml | 2 +- examples/pom.xml | 2 +- playwright/pom.xml | 2 +- pom.xml | 2 +- tools/api-generator/pom.xml | 2 +- tools/test-cli-fatjar/pom.xml | 2 +- tools/test-cli-version/pom.xml | 2 +- tools/test-local-installation/pom.xml | 2 +- tools/test-spring-boot-starter/pom.xml | 2 +- tools/update-docs-version/pom.xml | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/driver-bundle/pom.xml b/driver-bundle/pom.xml index 1f65521ad..0e116ea72 100644 --- a/driver-bundle/pom.xml +++ b/driver-bundle/pom.xml @@ -6,7 +6,7 @@ com.microsoft.playwright parent-pom - 1.50.0-SNAPSHOT + 1.63.0 driver-bundle diff --git a/driver/pom.xml b/driver/pom.xml index bf621037f..1542c6b8c 100644 --- a/driver/pom.xml +++ b/driver/pom.xml @@ -6,7 +6,7 @@ com.microsoft.playwright parent-pom - 1.50.0-SNAPSHOT + 1.63.0 driver diff --git a/examples/pom.xml b/examples/pom.xml index 66f426a37..b6012bb84 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -6,7 +6,7 @@ org.example examples - 1.50.0-SNAPSHOT + 1.63.0 Playwright Client Examples UTF-8 diff --git a/playwright/pom.xml b/playwright/pom.xml index e97c92a24..83ea25953 100644 --- a/playwright/pom.xml +++ b/playwright/pom.xml @@ -7,7 +7,7 @@ com.microsoft.playwright parent-pom - 1.50.0-SNAPSHOT + 1.63.0 playwright diff --git a/pom.xml b/pom.xml index 19fb4e055..8b5ef9bd1 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ com.microsoft.playwright parent-pom - 1.50.0-SNAPSHOT + 1.63.0 pom Playwright Parent Project Java library to automate Chromium, Firefox and WebKit with a single API. diff --git a/tools/api-generator/pom.xml b/tools/api-generator/pom.xml index 2e75e4c4e..727f0bd74 100644 --- a/tools/api-generator/pom.xml +++ b/tools/api-generator/pom.xml @@ -6,7 +6,7 @@ com.microsoft.playwright api-generator - 1.50.0-SNAPSHOT + 1.63.0 Playwright - API Generator This is an internal module used to generate Java API from the upstream Playwright diff --git a/tools/test-cli-fatjar/pom.xml b/tools/test-cli-fatjar/pom.xml index 916e92187..8848c60eb 100644 --- a/tools/test-cli-fatjar/pom.xml +++ b/tools/test-cli-fatjar/pom.xml @@ -4,7 +4,7 @@ 4.0.0 com.microsoft.playwright test-cli-fatjar - 1.50.0-SNAPSHOT + 1.63.0 Test Playwright Command Line FatJar 1.8 diff --git a/tools/test-cli-version/pom.xml b/tools/test-cli-version/pom.xml index fcb8a842a..975b41e37 100644 --- a/tools/test-cli-version/pom.xml +++ b/tools/test-cli-version/pom.xml @@ -4,7 +4,7 @@ 4.0.0 com.microsoft.playwright test-cli-version - 1.50.0-SNAPSHOT + 1.63.0 Test Playwright Command Line Version 1.8 diff --git a/tools/test-local-installation/pom.xml b/tools/test-local-installation/pom.xml index 88fb2c63a..b3a330f9a 100644 --- a/tools/test-local-installation/pom.xml +++ b/tools/test-local-installation/pom.xml @@ -4,7 +4,7 @@ 4.0.0 com.microsoft.playwright test-local-installation - 1.50.0-SNAPSHOT + 1.63.0 Test local installation Runs Playwright test suite (copied from playwright module) against locally cached Playwright diff --git a/tools/test-spring-boot-starter/pom.xml b/tools/test-spring-boot-starter/pom.xml index 953e5afcc..52607b62d 100644 --- a/tools/test-spring-boot-starter/pom.xml +++ b/tools/test-spring-boot-starter/pom.xml @@ -9,7 +9,7 @@ com.microsoft.playwright test-spring-boot-starter - 1.50.0-SNAPSHOT + 1.63.0 Test Playwright With Spring Boot 2.4.3 diff --git a/tools/update-docs-version/pom.xml b/tools/update-docs-version/pom.xml index cf24731ad..18ef320f1 100644 --- a/tools/update-docs-version/pom.xml +++ b/tools/update-docs-version/pom.xml @@ -6,7 +6,7 @@ com.microsoft.playwright update-version - 1.50.0-SNAPSHOT + 1.63.0 Playwright - Update Version in Documentation This is an internal module used to update versions in the documentation based on From eaba0dc72a17c9949ce974c764b46a73738334dd Mon Sep 17 00:00:00 2001 From: Yury Semikhatsky Date: Tue, 15 Sep 2026 12:37:22 -0700 Subject: [PATCH 2/9] cherry-pick(#1986): devops: move docker publishing to Azure DevOps --- .azure-pipelines/publish-docker.yml | 122 ++++++++++++++++++ .azure-pipelines/settings.xml | 3 +- .../skills/playwright-java-release/SKILL.md | 2 +- .dockerignore | 5 + .github/workflows/publish_docker.yml | 30 ----- utils/docker/Dockerfile.jammy | 13 +- utils/docker/Dockerfile.noble | 13 +- utils/docker/Dockerfile.resolute | 13 +- utils/docker/build.sh | 34 ++++- utils/docker/publish_docker.sh | 109 +++++++++------- 10 files changed, 254 insertions(+), 90 deletions(-) create mode 100644 .azure-pipelines/publish-docker.yml create mode 100644 .dockerignore delete mode 100644 .github/workflows/publish_docker.yml diff --git a/.azure-pipelines/publish-docker.yml b/.azure-pipelines/publish-docker.yml new file mode 100644 index 000000000..48ef7f9a6 --- /dev/null +++ b/.azure-pipelines/publish-docker.yml @@ -0,0 +1,122 @@ +# Trigger: any `v*` release tag (e.g. v1.40.0). +# Can also be queued manually from the ADO UI. +trigger: + tags: + include: + - v* + exclude: + - v*-* + +pr: none + +parameters: +- name: releaseChannel + displayName: "IMPORTANT: set this to 'canary' when triggering manually" + type: string + default: stable + values: + - stable + - canary + +resources: + repositories: + - repository: 1esPipelines + type: git + name: 1ESPipelineTemplates/1ESPipelineTemplates + ref: refs/tags/release + +extends: + template: v1/1ES.Official.PipelineTemplate.yml@1esPipelines + parameters: + pool: + name: DevDivPlaywrightAzurePipelinesUbuntu2204 + os: linux + sdl: + sourceAnalysisPool: + name: DevDivPlaywrightAzurePipelinesWindows2022 + # The image must be windows-based due to restrictions of the SDL tools. See: https://aka.ms/AAo6v8e + os: windows + suppression: + suppressionFile: $(Build.SourcesDirectory)\.azure-pipelines\guardian\SDL\.gdnsuppress + stages: + - stage: Publish + jobs: + - job: PublishDocker + displayName: "Publish Docker images to ACR" + # arm64 images are cross-built under QEMU emulation, which is slow. + timeoutInMinutes: 360 + steps: + - checkout: self + displayName: "Checkout code" + + - task: UseNode@1 + inputs: + version: '26.x' + displayName: "Install Node.js" + + # Relocate the Docker data-root to the large /mnt volume: this job builds + # 6 images (jammy/noble/resolute x amd64/arm64) and `docker system prune`s + # between them, so the default disk fills up. + - task: Bash@3 + displayName: "Setup docker" + inputs: + targetType: "inline" + script: | + set -x + sudo service docker stop + sudo mkdir -p /etc/docker + echo '{ "data-root": "/mnt/docker" }' | sudo tee /etc/docker/daemon.json + sudo service docker start + + # Used by scripts/download_driver.sh on the host. The repository root is the + # Docker build context, so .dockerignore keeps this file out of the images. + - task: Bash@3 + displayName: "setup .npmrc" + inputs: + targetType: "inline" + script: | + echo "registry=https://devdiv.pkgs.visualstudio.com/DevDiv/_packaging/DevDiv_PublicPackages/npm/registry/" >> .npmrc + + - task: npmAuthenticate@0 + displayName: "authenticate the private npm registry" + inputs: + workingFile: .npmrc + + # Must run before MavenAuthenticate@0 so the credentials it injects into + # ~/.m2/settings.xml are not overwritten by the copy. + - bash: | + mkdir -p ~/.m2 + cp .azure-pipelines/settings.xml ~/.m2/settings.xml + displayName: 'Copy settings.xml (mirror Maven Central to DevDiv_PublicPackages)' + + - task: MavenAuthenticate@0 + displayName: 'Authenticate to DevDiv_PublicPackages feed' + inputs: + artifactsFeeds: DevDiv_PublicPackages + + - task: AzureCLI@2 + displayName: "Login to ACR via OIDC" + inputs: + azureSubscription: "Playwright-CDN" + scriptType: "bash" + scriptLocation: "inlineScript" + inlineScript: "az acr login --name playwright" + + - task: Bash@3 + displayName: "Register QEMU (binfmt) for arm64 cross-build" + inputs: + targetType: "inline" + script: "docker run --rm --privileged ${ACR_CACHE_PREFIX}tonistiigi/binfmt --install arm64" + env: + ACR_CACHE_PREFIX: "playwright.azurecr.io/cached/" + + - task: Bash@3 + displayName: "Build & publish Docker images" + inputs: + targetType: "inline" + # The authenticated settings.xml is passed to `docker build` as a secret so + # that Maven inside the image also resolves from DevDiv_PublicPackages. + script: MAVEN_SETTINGS_SECRET="$HOME/.m2/settings.xml" ./utils/docker/publish_docker.sh ${{ parameters.releaseChannel }} + env: + ACR_CACHE_PREFIX: "playwright.azurecr.io/cached/" + UBUNTU_MIRROR_PREFIX: "azure." diff --git a/.azure-pipelines/settings.xml b/.azure-pipelines/settings.xml index 34e9be56f..1617d36e9 100644 --- a/.azure-pipelines/settings.xml +++ b/.azure-pipelines/settings.xml @@ -1,6 +1,7 @@ + + org.codehaus.mojo + exec-maven-plugin + 3.6.4 + diff --git a/utils/docker/publish_docker.sh b/utils/docker/publish_docker.sh index 2e50745d4..b1ab7f4de 100755 --- a/utils/docker/publish_docker.sh +++ b/utils/docker/publish_docker.sh @@ -20,7 +20,12 @@ if [[ ! -f ${POM_FILE} ]]; then echo "ERROR: pom.xml not found at ${POM_FILE}" exit 1; fi -PW_VERSION=$(mvn exec:exec -Dexec.executable='echo' -Dexec.args='${project.version}' -f ${POM_FILE} --non-recursive -q 2>/dev/null) +if ! PW_VERSION=$(mvn exec:exec -Dexec.executable='echo' -Dexec.args='${project.version}' -f ${POM_FILE} --non-recursive -q); then + # With -q Maven prints its errors to stdout, which was captured above. + echo "ERROR: failed to read the project version from ${POM_FILE}:" + echo "${PW_VERSION}" + exit 1 +fi if [[ "${RELEASE_CHANNEL}" == "stable" && ! "${PW_VERSION}" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then echo "ERROR: cannot publish stable docker with Playwright version '${PW_VERSION}'" exit 1 From 60dd518da34a82fde00f39ecab4760f59571c0d1 Mon Sep 17 00:00:00 2001 From: Yury Semikhatsky Date: Tue, 3 Nov 2026 11:03:27 -0800 Subject: [PATCH 4/9] cherry-pick(#2037): devops(docker): exclude .git from the Docker build context --- .dockerignore | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.dockerignore b/.dockerignore index f609d7b5c..7dc6ab376 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,5 +1,8 @@ -# The repository root is the Docker build context (see utils/docker/build.sh). -# Keep registry credentials written by the release pipeline out of the images. +# The repository root is the Docker build context (see utils/docker/build.sh), +# and the image build copies all of it. Keep VCS metadata, registry credentials +# and local environment files out of the build context. +**/.git **/.npmrc +**/.env* # Downloaded by publish_docker.sh after the first push. utils/docker/oras From 4de83aea6ca960ef0363d281563695f82818f9ce Mon Sep 17 00:00:00 2001 From: Yury Semikhatsky Date: Tue, 3 Nov 2026 11:03:27 -0800 Subject: [PATCH 5/9] cherry-pick(#2036): devops: add explicit checkout steps to pipelines --- .azure-pipelines/publish-docker.yml | 1 + .azure-pipelines/publish.yml | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/.azure-pipelines/publish-docker.yml b/.azure-pipelines/publish-docker.yml index 48ef7f9a6..53095d1b4 100644 --- a/.azure-pipelines/publish-docker.yml +++ b/.azure-pipelines/publish-docker.yml @@ -47,6 +47,7 @@ extends: timeoutInMinutes: 360 steps: - checkout: self + persistCredentials: false displayName: "Checkout code" - task: UseNode@1 diff --git a/.azure-pipelines/publish.yml b/.azure-pipelines/publish.yml index 4572d6cd8..c17cd96c3 100644 --- a/.azure-pipelines/publish.yml +++ b/.azure-pipelines/publish.yml @@ -36,6 +36,10 @@ extends: path: $(Build.ArtifactStagingDirectory)/esrp-build artifact: esrp-build steps: + - checkout: self + persistCredentials: false + displayName: "Checkout code" + - bash: | if [[ ! "$CURRENT_BRANCH" =~ ^v1\..* ]]; then echo "Can only publish from a release tag branch (v1.*)." From 587ccf48fccc975a542af8d3d9284ba982c7fd04 Mon Sep 17 00:00:00 2001 From: Yury Semikhatsky Date: Tue, 3 Nov 2026 13:45:02 -0800 Subject: [PATCH 6/9] cherry-pick(#2038): devops: pin the Node.js major version of the driver in scripts/NODE_VERSION --- .github/workflows/test_docker.yml | 1 + CONTRIBUTING.md | 2 +- scripts/NODE_VERSION | 1 + scripts/download_driver.sh | 29 ++++++++++++++++------------- scripts/roll_driver.sh | 10 ++++------ utils/docker/Dockerfile.jammy | 2 ++ utils/docker/Dockerfile.noble | 2 ++ utils/docker/Dockerfile.resolute | 2 ++ 8 files changed, 29 insertions(+), 20 deletions(-) create mode 100644 scripts/NODE_VERSION diff --git a/.github/workflows/test_docker.yml b/.github/workflows/test_docker.yml index 36b07f466..cd8f86606 100644 --- a/.github/workflows/test_docker.yml +++ b/.github/workflows/test_docker.yml @@ -12,6 +12,7 @@ on: - .github/workflows/test_docker.yml - '**/Dockerfile*' - scripts/DRIVER_VERSION + - scripts/NODE_VERSION - '**/pom.xml' branches: - main diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 1a54c0547..4601061f6 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -41,7 +41,7 @@ cd playwright-java scripts/download_driver.sh ``` -Each driver is assembled from the [`playwright-core`](https://www.npmjs.com/package/playwright-core) npm package (version pinned in [scripts/DRIVER_VERSION](scripts/DRIVER_VERSION)) and the matching Node.js binary from https://nodejs.org, the same way the upstream Playwright build does it. +Each driver is assembled from the [`playwright-core`](https://www.npmjs.com/package/playwright-core) npm package (version pinned in [scripts/DRIVER_VERSION](scripts/DRIVER_VERSION)) and the latest Node.js binary of the major version pinned in [scripts/NODE_VERSION](scripts/NODE_VERSION) from https://nodejs.org, the same way the upstream Playwright build does it. ### Building and running the tests with Maven diff --git a/scripts/NODE_VERSION b/scripts/NODE_VERSION new file mode 100644 index 000000000..6f4247a62 --- /dev/null +++ b/scripts/NODE_VERSION @@ -0,0 +1 @@ +26 diff --git a/scripts/download_driver.sh b/scripts/download_driver.sh index 5e36f91e3..24a53de7f 100755 --- a/scripts/download_driver.sh +++ b/scripts/download_driver.sh @@ -10,10 +10,10 @@ if [[ ($1 == '-h') || ($1 == '--help') ]]; then echo "" echo "This script downloads and assembles the Playwright driver for all platforms." echo "The platform-independent 'playwright-core' npm package is assembled once into the driver" - echo "module ('driver/src/main/resources/driver/package'), and the matching Node.js binary from" - echo "https://nodejs.org for each platform goes into the driver-bundle module" - echo "('driver-bundle/src/main/resources/driver/'), the same way the upstream" - echo "Playwright build does it." + echo "module ('driver/src/main/resources/driver/package'), and the Node.js binary from" + echo "https://nodejs.org (major version pinned in scripts/NODE_VERSION) for each platform goes" + echo "into the driver-bundle module ('driver-bundle/src/main/resources/driver/'), the" + echo "same way the upstream Playwright build does it." echo "" echo "Usage: scripts/download_driver.sh [option]" echo "" @@ -46,13 +46,19 @@ npm_at_root() { (cd "$ROOT" && npm "$@") } -# The Node.js version used to be pinned in the upstream driver build script. The script was -# removed in microsoft/playwright#41518, so we follow the same policy it had: the latest -# Node.js LTS (see upstream utils/build/update-playwright-node.mjs). -NODE_VERSION=$(curl -fsSL "https://nodejs.org/dist/index.json" \ - | node -e "let s='';process.stdin.on('data',d=>s+=d).on('end',()=>console.log(JSON.parse(s).find(r=>r.lts).version.slice(1)))") +TMP_DIR="$(mktemp -d)" +trap 'rm -rf "$TMP_DIR"' EXIT + +# scripts/NODE_VERSION pins the Node.js major version, like ARG NODE_VERSION in the upstream +# Docker images. Use the latest release of that major version. +NODE_MAJOR_VERSION=$(head -1 ./NODE_VERSION) +# The checksum list of the latest release names every file after the release, e.g. +# d38bd5e5... node-v26.13.0-darwin-arm64.tar.gz +SHASUMS="$TMP_DIR/SHASUMS256.txt" +download "https://nodejs.org/dist/latest-v$NODE_MAJOR_VERSION.x/SHASUMS256.txt" "$SHASUMS" +NODE_VERSION=$(sed -nE 's/.*node-v([0-9]+\.[0-9]+\.[0-9]+)-.*/\1/p' "$SHASUMS" | head -1) if [[ -z "$NODE_VERSION" ]]; then - echo "Failed to determine the latest Node.js LTS version" + echo "Failed to determine the latest Node.js $NODE_MAJOR_VERSION.x version" exit 1 fi @@ -64,9 +70,6 @@ echo "Node.js version: $NODE_VERSION" CORE_DEST="$ROOT/driver/src/main/resources/driver" NODE_DEST="$ROOT/driver-bundle/src/main/resources/driver" -TMP_DIR="$(mktemp -d)" -trap 'rm -rf "$TMP_DIR"' EXIT - # 1. playwright-core package -> driver module (once, shared by every platform). echo "Assembling playwright-core package to $CORE_DEST/package" rm -rf "$CORE_DEST/package" diff --git a/scripts/roll_driver.sh b/scripts/roll_driver.sh index f8535e57f..4b45e85a2 100755 --- a/scripts/roll_driver.sh +++ b/scripts/roll_driver.sh @@ -24,12 +24,10 @@ fi CURRENT_VERSION=$(head -1 ./DRIVER_VERSION) echo "Rolling driver from $CURRENT_VERSION to $NEW_VERSION" -if [[ "$CURRENT_VERSION" == "$NEW_VERSION" ]]; then - echo "Current version is up to date. Skipping driver download."; -else - echo $NEW_VERSION > ./DRIVER_VERSION - ./download_driver.sh -fi; +echo $NEW_VERSION > ./DRIVER_VERSION +# Download even when the driver version is unchanged: the driver bundles the latest release +# of the Node.js major version pinned in NODE_VERSION. +./download_driver.sh ./generate_api.sh ./update_readme.sh diff --git a/utils/docker/Dockerfile.jammy b/utils/docker/Dockerfile.jammy index f049bb896..1bd15d820 100644 --- a/utils/docker/Dockerfile.jammy +++ b/utils/docker/Dockerfile.jammy @@ -19,6 +19,8 @@ RUN find /etc/apt -type f \( -name '*.list' -o -name '*.sources' \) \ wget \ # Install utilities required for downloading driver unzip \ + # The Node.js binary of the driver links against libatomic (since Node.js 25) + libatomic1 \ # For the MSEdge install script gpg && \ rm -rf /var/lib/apt/lists/* && \ diff --git a/utils/docker/Dockerfile.noble b/utils/docker/Dockerfile.noble index 59c01754e..e4365a2f3 100644 --- a/utils/docker/Dockerfile.noble +++ b/utils/docker/Dockerfile.noble @@ -19,6 +19,8 @@ RUN find /etc/apt -type f \( -name '*.list' -o -name '*.sources' \) \ wget \ # Install utilities required for downloading driver unzip \ + # The Node.js binary of the driver links against libatomic (since Node.js 25) + libatomic1 \ # For the MSEdge install script gpg && \ rm -rf /var/lib/apt/lists/* && \ diff --git a/utils/docker/Dockerfile.resolute b/utils/docker/Dockerfile.resolute index fb9b72c7f..45c669f94 100644 --- a/utils/docker/Dockerfile.resolute +++ b/utils/docker/Dockerfile.resolute @@ -19,6 +19,8 @@ RUN find /etc/apt -type f \( -name '*.list' -o -name '*.sources' \) \ wget \ # Install utilities required for downloading driver unzip \ + # The Node.js binary of the driver links against libatomic (since Node.js 25) + libatomic1 \ # For the MSEdge install script gpg && \ rm -rf /var/lib/apt/lists/* && \ From 91fad3ea19863d05535fc337443c94335740cb38 Mon Sep 17 00:00:00 2001 From: Yury Semikhatsky Date: Wed, 4 Nov 2026 17:09:56 -0800 Subject: [PATCH 7/9] cherry-pick(#2039): devops: pin the driver's Node.js major version to 24 on release-1.64 --- scripts/NODE_VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/NODE_VERSION b/scripts/NODE_VERSION index 6f4247a62..a45fd52cc 100644 --- a/scripts/NODE_VERSION +++ b/scripts/NODE_VERSION @@ -1 +1 @@ -26 +24 From 9795b1d7b88b3a04ede5aa77fc5bb5e60dd07b7a Mon Sep 17 00:00:00 2001 From: Yury Semikhatsky Date: Wed, 21 Oct 2026 10:35:05 -0700 Subject: [PATCH 8/9] cherry-pick(#2015): devops(docker): download Maven through the configured Maven mirror --- utils/docker/Dockerfile.jammy | 10 ++++++---- utils/docker/Dockerfile.noble | 10 ++++++---- utils/docker/build.sh | 8 ++++++++ 3 files changed, 20 insertions(+), 8 deletions(-) diff --git a/utils/docker/Dockerfile.jammy b/utils/docker/Dockerfile.jammy index 1bd15d820..316a95d4f 100644 --- a/utils/docker/Dockerfile.jammy +++ b/utils/docker/Dockerfile.jammy @@ -28,10 +28,12 @@ RUN find /etc/apt -type f \( -name '*.list' -o -name '*.sources' \) \ adduser pwuser # Ubuntu 22.04 and earlier come with Maven 3.6.3 which fails with -# Java 25, so we install latest Maven from Apache instead. -RUN VERSION=3.9.12 && \ - wget -O - https://archive.apache.org/dist/maven/maven-3/$VERSION/binaries/apache-maven-$VERSION-bin.tar.gz | tar zxfv - -C /opt/ && \ - ln -s /opt/apache-maven-$VERSION/bin/mvn /usr/local/bin/ +# Java 25, so we install latest Maven from Apache instead. build.sh +# downloads it into utils/docker/maven. +ARG MAVEN_VERSION +RUN --mount=type=bind,source=utils/docker/maven,target=/tmp/maven \ + tar zxf /tmp/maven/apache-maven-$MAVEN_VERSION-bin.tar.gz -C /opt/ && \ + ln -s /opt/apache-maven-$MAVEN_VERSION/bin/mvn /usr/local/bin/ ARG PW_TARGET_ARCH ENV JAVA_HOME=/usr/lib/jvm/java-25-openjdk-${PW_TARGET_ARCH} diff --git a/utils/docker/Dockerfile.noble b/utils/docker/Dockerfile.noble index e4365a2f3..5ccd4d7bf 100644 --- a/utils/docker/Dockerfile.noble +++ b/utils/docker/Dockerfile.noble @@ -28,10 +28,12 @@ RUN find /etc/apt -type f \( -name '*.list' -o -name '*.sources' \) \ adduser pwuser # Ubuntu 22.04 and earlier come with Maven 3.6.3 which fails with -# Java 25, so we install latest Maven from Apache instead. -RUN VERSION=3.9.12 && \ - wget -O - https://archive.apache.org/dist/maven/maven-3/$VERSION/binaries/apache-maven-$VERSION-bin.tar.gz | tar zxfv - -C /opt/ && \ - ln -s /opt/apache-maven-$VERSION/bin/mvn /usr/local/bin/ +# Java 25, so we install latest Maven from Apache instead. build.sh +# downloads it into utils/docker/maven. +ARG MAVEN_VERSION +RUN --mount=type=bind,source=utils/docker/maven,target=/tmp/maven \ + tar zxf /tmp/maven/apache-maven-$MAVEN_VERSION-bin.tar.gz -C /opt/ && \ + ln -s /opt/apache-maven-$MAVEN_VERSION/bin/mvn /usr/local/bin/ ARG PW_TARGET_ARCH ENV JAVA_HOME=/usr/lib/jvm/java-25-openjdk-${PW_TARGET_ARCH} diff --git a/utils/docker/build.sh b/utils/docker/build.sh index efd5e6670..c1225245d 100755 --- a/utils/docker/build.sh +++ b/utils/docker/build.sh @@ -38,6 +38,13 @@ PW_TARGET_ARCH=$(echo $1 | cut -c3-) # it up via `COPY . /tmp/pw-java`. ../../scripts/download_driver.sh +# The jammy and noble images install this Maven (see the Dockerfiles). Fetch it with the +# host's Maven so that it resolves through the configured mirror: the release pipeline +# cannot reach Maven Central directly (see .azure-pipelines/settings.xml). +MAVEN_VERSION=3.9.12 +mvn dependency:copy -Dartifact="org.apache.maven:apache-maven:${MAVEN_VERSION}:tar.gz:bin" \ + -DoutputDirectory=maven --no-transfer-progress -q + SECRET_ARGS=() if [[ -n "${MAVEN_SETTINGS_SECRET:-}" ]]; then SECRET_ARGS+=(--secret "id=mavensettings,src=${MAVEN_SETTINGS_SECRET}") @@ -59,6 +66,7 @@ fi for ((attempt = 1; attempt <= MAX_ATTEMPTS; attempt++)); do if docker build --platform "${PLATFORM}" \ --build-arg "PW_TARGET_ARCH=${PW_TARGET_ARCH}" \ + --build-arg "MAVEN_VERSION=${MAVEN_VERSION}" \ --build-arg ACR_CACHE_PREFIX="${ACR_CACHE_PREFIX}" \ --build-arg UBUNTU_MIRROR_PREFIX="${UBUNTU_MIRROR_PREFIX}" \ "${SECRET_ARGS[@]}" \ From 10e52d84de48461e1dc2c4b61fb16cf9562e934a Mon Sep 17 00:00:00 2001 From: Yury Semikhatsky Date: Wed, 4 Nov 2026 18:52:09 -0800 Subject: [PATCH 9/9] devops(docker): install Maven from apt in the resolute image Ubuntu 26.04 ships Maven 3.9.12, so install it with apt instead of downloading it from the internet, matching release-1.64. The release pipeline cannot reach archive.apache.org. --- utils/docker/Dockerfile.resolute | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/utils/docker/Dockerfile.resolute b/utils/docker/Dockerfile.resolute index 45c669f94..7dabf1f96 100644 --- a/utils/docker/Dockerfile.resolute +++ b/utils/docker/Dockerfile.resolute @@ -15,6 +15,8 @@ RUN find /etc/apt -type f \( -name '*.list' -o -name '*.sources' \) \ -exec sed -i "s|http://archive.ubuntu.com|http://${UBUNTU_MIRROR_PREFIX}archive.ubuntu.com|g; s|http://ports.ubuntu.com|http://${UBUNTU_MIRROR_PREFIX}ports.ubuntu.com|g" {} + && \ apt-get update && \ apt-get install -y --no-install-recommends openjdk-25-jdk \ + # Ubuntu 26.04 ships Maven 3.9.12 + maven \ # Install utilities required for downloading browsers wget \ # Install utilities required for downloading driver @@ -27,12 +29,6 @@ RUN find /etc/apt -type f \( -name '*.list' -o -name '*.sources' \) \ # Create the pwuser useradd -m -s /bin/bash pwuser -# Ubuntu 22.04 and earlier come with Maven 3.6.3 which fails with -# Java 25, so we install latest Maven from Apache instead. -RUN VERSION=3.9.12 && \ - wget -O - https://archive.apache.org/dist/maven/maven-3/$VERSION/binaries/apache-maven-$VERSION-bin.tar.gz | tar zxfv - -C /opt/ && \ - ln -s /opt/apache-maven-$VERSION/bin/mvn /usr/local/bin/ - ARG PW_TARGET_ARCH ENV JAVA_HOME=/usr/lib/jvm/java-25-openjdk-${PW_TARGET_ARCH}