From 53d326b5d3bc6c78cae8e65e984671bda167c64f Mon Sep 17 00:00:00 2001 From: Sylwester Lachiewicz Date: Tue, 29 Sep 2026 17:28:57 +0200 Subject: [PATCH] Use a per-workspace local repository in Jenkins builds The two ubuntu stages can land on the same agent and share ~/.m2; their concurrent MNG-4745 runs then overwrite each other's cached plugin metadata. --- Jenkinsfile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index b63c1733c..b35479b16 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -49,10 +49,12 @@ def mavenBuild(jdk, mvnName) { script { try { withMaven(jdk: "$jdk", maven: "$mvnName", publisherStrategy: 'EXPLICIT', mavenOpts: "-Xms2g -Xmx4g -Djava.awt.headless=true") { + // parallel stages can share an agent; a shared ~/.m2 lets their ITs race on the same artifacts + String localRepo = "${env.WORKSPACE}/.repository" if (isUnix()) { - sh "mvn -V clean install -Prun-its,embedded -B" + sh "mvn -V clean install -Prun-its,embedded -B -Dmaven.repo.local=${localRepo}" } else { - bat "mvn -V clean install -Prun-its,embedded -B" + bat "mvn -V clean install -Prun-its,embedded -B -Dmaven.repo.local=${localRepo}" } } }