This is an automated email from the ASF dual-hosted git repository.
benweidig pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tapestry-5.git
The following commit(s) were added to refs/heads/master by this push:
new 320d5ecef TAP5-2819: Jenkinsfile another attempt to fix cell separation
320d5ecef is described below
commit 320d5ecef6de76daad2c83a53799e216744f3a74
Author: Ben Weidig <[email protected]>
AuthorDate: Sun Apr 19 09:26:12 2026 +0200
TAP5-2819: Jenkinsfile another attempt to fix cell separation
---
Jenkinsfile | 59 ++++++++++++++++++++++++++---------------------------------
1 file changed, 26 insertions(+), 33 deletions(-)
diff --git a/Jenkinsfile b/Jenkinsfile
index 38b36f113..a6ec68b57 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -23,6 +23,9 @@ pipeline {
agent {
node {
label 'ubuntu'
+ // Use cell-based workspaces.
+ // This shouldn't be needed, but we had some weird
matrix issues.
+ customWorkspace
"workspace/${env.JOB_NAME}-${JDK_VERSION}"
}
}
@@ -49,39 +52,29 @@ pipeline {
}
post {
always {
- script {
- // Define a clean, unique destination for
this cell
- def cellArtifactPath =
"build/matrix-artifacts/${JDK_VERSION}"
-
- sh """
- # Remove any old artifacts from
previous runs on this same node
- rm -rf -- "${cellArtifactPath}"
- mkdir -p -- "${cellArtifactPath}"
-
- # Find all test results and reports,
but EXCLUDE our own destination.
- # We use -mindepth to ensure we don't
pick up the root accidentally.
- find . -mindepth 2 \\( -path
'*/build/reports' -o -path '*/build/test-results' \\) \
- -not -path '*/matrix-artifacts/*'
-type d | while read -r src; do
- # Create a path-based destination
name to avoid collisions
- rel_src=\${src#./}
-
dest_dir="${cellArtifactPath}/\${rel_src}"
- mkdir -p -- "\$dest_dir"
- cp -r -- "\$src/." "\$dest_dir/"
- done
- """
-
- // Point JUnit ONLY to the namespaced
folder for this specific matrix cell
- junit(
- testResults:
"${cellArtifactPath}/**/test-results/**/*.xml",
- allowEmptyResults: true
- )
-
- // Archive only the namespaced artifacts
- archiveArtifacts(
- artifacts: "${cellArtifactPath}/**/*",
- allowEmptyArchive: true
- )
- }
+ // JUnit namespaces automatically on matrix
cells
+ junit(
+ testResults:
'**/build/test-results/**/*.xml',
+ allowEmptyResults: true
+ )
+
+ // archiveArtifacts has no per-cell
namespacing in matrix builds,
+ // so we copy into a JDK-labelled folder first
to avoid cells
+ // overwriting each other's reports in the
artifact store.
+ sh """
+ find . \\( -path '*/build/reports' -o
-path '*/build/test-results' \\) \
+ -not -path '*/matrix-artifacts/*'
-type d | while read -r src; do
+
dest="build/matrix-artifacts/${JDK_VERSION}/\${src#./}"
+ mkdir -p -- "\$dest"
+ cp -r -- "\$src/." "\$dest/"
+ done
+ """
+
+ archiveArtifacts(
+ artifacts:
"build/matrix-artifacts/${JDK_VERSION}/**/*",
+ allowEmptyArchive: true,
+ fingerprint: false
+ )
}
}
}