Jenkins and plugins versions report
Environment
Jenkins: 2.504.3
OS: Linux - 6.12.53-69.119.amzn2023.aarch64
Java: 17.0.15 - Eclipse Adoptium (OpenJDK 64-Bit Server VM)
---
Parameterized-Remote-Trigger:3.2.1
active-directory:2.40
ansicolor:1.0.6
ant:513.vde9e7b_a_0da_0f
antisamy-markup-formatter:173.v680e3a_b_69ff3
apache-httpcomponents-client-4-api:4.5.14-269.vfa_2321039a_83
apache-httpcomponents-client-5-api:5.5-150.veb_76e719855b_
artifactory:4.0.8
asm-api:9.8-163.vb_2a_96d3f9c3c
authentication-tokens:1.144.v5ff4a_5ec5c33
aws-credentials:248.v78a_dcfc9db_ff
aws-java-sdk:1.12.780-480.v4a_0819121a_9e
aws-java-sdk-api-gateway:1.12.780-480.v4a_0819121a_9e
aws-java-sdk-autoscaling:1.12.780-480.v4a_0819121a_9e
aws-java-sdk-cloudformation:1.12.780-480.v4a_0819121a_9e
aws-java-sdk-cloudfront:1.12.780-480.v4a_0819121a_9e
aws-java-sdk-cloudwatch:1.12.780-480.v4a_0819121a_9e
aws-java-sdk-codebuild:1.12.780-480.v4a_0819121a_9e
aws-java-sdk-codedeploy:1.12.780-480.v4a_0819121a_9e
aws-java-sdk-ec2:1.12.780-480.v4a_0819121a_9e
aws-java-sdk-ecr:1.12.780-480.v4a_0819121a_9e
aws-java-sdk-ecs:1.12.780-480.v4a_0819121a_9e
aws-java-sdk-efs:1.12.780-480.v4a_0819121a_9e
aws-java-sdk-elasticbeanstalk:1.12.780-480.v4a_0819121a_9e
aws-java-sdk-elasticloadbalancingv2:1.12.780-480.v4a_0819121a_9e
aws-java-sdk-iam:1.12.780-480.v4a_0819121a_9e
aws-java-sdk-kinesis:1.12.780-480.v4a_0819121a_9e
aws-java-sdk-lambda:1.12.780-480.v4a_0819121a_9e
aws-java-sdk-logs:1.12.780-480.v4a_0819121a_9e
aws-java-sdk-minimal:1.12.780-480.v4a_0819121a_9e
aws-java-sdk-organizations:1.12.780-480.v4a_0819121a_9e
aws-java-sdk-secretsmanager:1.12.780-480.v4a_0819121a_9e
aws-java-sdk-sns:1.12.780-480.v4a_0819121a_9e
aws-java-sdk-sqs:1.12.780-480.v4a_0819121a_9e
aws-java-sdk-ssm:1.12.780-480.v4a_0819121a_9e
aws-java-sdk2-apigateway:2.31.63-54.vcf1e5a_c56c49
aws-java-sdk2-autoscaling:2.31.63-54.vcf1e5a_c56c49
aws-java-sdk2-cloudformation:2.31.63-54.vcf1e5a_c56c49
aws-java-sdk2-cloudfront:2.31.63-54.vcf1e5a_c56c49
aws-java-sdk2-cloudwatch:2.31.63-54.vcf1e5a_c56c49
aws-java-sdk2-cloudwatchlogs:2.31.63-54.vcf1e5a_c56c49
aws-java-sdk2-codebuild:2.31.63-54.vcf1e5a_c56c49
aws-java-sdk2-codedeploy:2.31.63-54.vcf1e5a_c56c49
aws-java-sdk2-core:2.31.63-54.vcf1e5a_c56c49
aws-java-sdk2-ec2:2.31.63-54.vcf1e5a_c56c49
aws-java-sdk2-ecr:2.31.63-54.vcf1e5a_c56c49
aws-java-sdk2-ecs:2.31.63-54.vcf1e5a_c56c49
aws-java-sdk2-efs:2.31.63-54.vcf1e5a_c56c49
aws-java-sdk2-elasticbeanstalk:2.31.63-54.vcf1e5a_c56c49
aws-java-sdk2-elasticloadbalancingv2:2.31.63-54.vcf1e5a_c56c49
aws-java-sdk2-iam:2.31.63-54.vcf1e5a_c56c49
aws-java-sdk2-kinesis:2.31.63-54.vcf1e5a_c56c49
aws-java-sdk2-lambda:2.31.63-54.vcf1e5a_c56c49
aws-java-sdk2-organizations:2.31.63-54.vcf1e5a_c56c49
aws-java-sdk2-s3:2.31.63-54.vcf1e5a_c56c49
aws-java-sdk2-secretsmanager:2.31.63-54.vcf1e5a_c56c49
aws-java-sdk2-sns:2.31.63-54.vcf1e5a_c56c49
aws-java-sdk2-sqs:2.31.63-54.vcf1e5a_c56c49
aws-java-sdk2-ssm:2.31.63-54.vcf1e5a_c56c49
basic-branch-build-strategies:228.v68c089762a_db_
blueocean:1.27.21
blueocean-autofavorite:1.2.5
blueocean-bitbucket-pipeline:1.27.21
blueocean-commons:1.27.21
blueocean-config:1.27.21
blueocean-core-js:1.27.21
blueocean-dashboard:1.27.21
blueocean-display-url:2.4.4
blueocean-events:1.27.21
blueocean-executor-info:1.27.21
blueocean-git-pipeline:1.27.21
blueocean-github-pipeline:1.27.21
blueocean-i18n:1.27.21
blueocean-jira:1.27.21
blueocean-jwt:1.27.21
blueocean-personalization:1.27.21
blueocean-pipeline-api-impl:1.27.21
blueocean-pipeline-editor:1.27.21
blueocean-pipeline-scm-api:1.27.21
blueocean-rest:1.27.21
blueocean-rest-impl:1.27.21
blueocean-web:1.27.21
bootstrap5-api:5.3.7-2
bouncycastle-api:2.30.1.81-264.v95c79c0e772c
branch-api:2.1235.v04e86c7ce54c
build-blocker-plugin:166.vc82fc20b_a_ed6
build-pipeline-plugin:2.0.2
build-user-vars-plugin:195.v8c35f9d5c3dc
caffeine-api:3.2.2-178.v353b_8428ed56
checks-api:373.vfe7645102093
chromedriver:1.2
cloudbees-bitbucket-branch-source:936.4.4
cloudbees-folder:6.1037.v4cb_8573b_72a_a_
cobertura:1.17
code-coverage-api:4.99.0
command-launcher:123.v37cfdc92ef67
commons-collections4-api:4.5.0-8.va_d5448ef9011
commons-compress-api:1.28.0-1
commons-lang3-api:3.18.0-98.v3a_674c06072d
commons-text-api:1.14.0-194.v804a_dc3a_1b_d8
conditional-buildstep:1.5.0
config-file-provider:988.v0461fcc2b_9d1
configuration-as-code:1985.vdda_32d0c4ea_b_
coverage:2.7.1
credentials:1419.v2337d1ceceef
credentials-binding:702.vfe613e537e88
data-tables-api:2.3.2-3
date-parameter:58.v0ee8d1c59323
describe-with-params:1.0
description-setter:264.v1957f215dcd5
display-url-api:2.217.va_6b_de84cc74b_
durable-task:595.ve87b_f1318d67
echarts-api:6.0.0-1
eddsa-api:0.3.0.1-19.vc432d923e5ee
embeddable-build-status:548.v5653c6e28c41
extended-choice-parameter:388.ve7b_d0b_920e10
favorite:2.237.v79163ca_8b_892
file-parameters:367.vc2cc39fb_b_593
font-awesome-api:7.0.0-1
forensics-api:3.1.0
git:5.7.0
git-client:6.3.0
git-server:137.ve0060b_432302
github:1.44.0
github-api:1.321-488.v9b_c0da_9533f8
github-branch-source:1834.v857721ea_74c6
google-chat-notification:166.ve6b_de280f2e8
gradle:2.15
groovy:497.v7b_061a_a_de65d
gson-api:2.13.1-153.vb_3d0c48a_a_b_4a_
handy-uri-templates-2-api:2.1.8-36.v85e4cb_234a_13
htmlpublisher:427
instance-identity:203.v15e81a_1b_7a_38
ionicons-api:94.vcc3065403257
ivy:582.v35fb_da_0312f7
jackson2-api:2.19.2-408.v18248a_324cfe
jakarta-activation-api:2.1.3-2
jakarta-mail-api:2.1.3-2
javadoc:354.vee1a_660b_4990
javax-activation-api:1.2.0-8
javax-mail-api:1.6.2-11
jaxb:2.3.9-133.vb_ec76a_73f706
jdk-tool:83.v417146707a_3d
jenkins-design-language:1.27.21
jersey2-api:2.47-165.ve7809a_3e87e0
jfrog:1.5.8
jira:3.18
jjwt-api:0.11.5-120.v0268cf544b_89
jobConfigHistory:1343.v4b_e819a_ecdc2
joda-time-api:2.14.0-149.v1c3ce991d1b_9
jquery:1.12.4-3
jquery3-api:3.7.1-3
jsch:0.2.16-95.v3eecb_55fa_b_78
json-api:20250517-163.v1c5da_e99c775
json-path-api:2.9.0-178.vca_b_c71881321
jsoup:1.21.1-58.vfc578e6e2610
junit:1335.v6b_a_a_e18534e1
kubernetes:4358.vcfd9c5a_0a_f51
kubernetes-client-api:7.3.1-256.v788a_0b_787114
kubernetes-credentials:203.v85b_9836a_f44b_
kubernetes-credentials-provider:1.290.ve56494531260
leastload:62.vfa_8830902733
lockable-resources:1408.vb_7d1f371781d
mailer:515.vd788654779b_1
mask-passwords:199.va_0218b_a_59186
matrix-auth:3.2.6
matrix-project:849.v0cd64ed7e531
maven-plugin:3.26
metrics:4.2.32-481.v75f035fdc894
mina-sshd-api-common:2.15.0-161.vb_200831a_c15b_
mina-sshd-api-core:2.15.0-161.vb_200831a_c15b_
msbuild:1.37
multibranch-build-strategy-extension:64.v348e3c69f1f5
next-build-number:66.v4b_4762172d53
nodejs:1.6.5
okhttp-api:4.11.0-189.v976fa_d3379d6
oss-symbols-api:392.v27a_482d90083
ownership:0.13.0
parameterized-scheduler:285.ve611986d4c48
parameterized-trigger:859.vb_e3907a_07a_16
pipeline-aws:1.45
pipeline-build-step:571.v08a_fffd4b_0ce
pipeline-github:2.8-162.382498405fdc
pipeline-graph-analysis:241.vc3d48fb_b_2582
pipeline-groovy-lib:752.vdddedf804e72
pipeline-input-step:532.v9e7466cb_4406
pipeline-milestone-step:138.v78ca_76831a_43
pipeline-model-api:2.2258.v4e96d2b_da_f9b_
pipeline-model-definition:2.2258.v4e96d2b_da_f9b_
pipeline-model-extensions:2.2258.v4e96d2b_da_f9b_
pipeline-multibranch-defaults:2.1
pipeline-rest-api:2.38
pipeline-stage-step:322.vecffa_99f371c
pipeline-stage-tags-metadata:2.2258.v4e96d2b_da_f9b_
pipeline-stage-view:2.38
pipeline-utility-steps:2.19.0
plain-credentials:199.v9f8e1f741799
plugin-util-api:6.1.0
postbuild-task:78.v24529f1f5cdb_
powershell:2.3
prism-api:1.30.0-1
pubsub-light:1.19
rebuild:338.va_0a_b_50e29397
run-condition:243.v3c3f94e46a_8b_
scm-api:707.v749f968369d4
scm-filter-branch-pr:222.v72301ecb_a_ee7
script-security:1378.vf25626395f49
snakeyaml-api:2.3-125.v4d77857a_b_402
sse-gateway:1.28
ssh-agent:386.v36cc0c7582f0
ssh-credentials:361.vb_f6760818e8c
sshd:3.372.v5d04a_e92d8cf
structs:353.v261ea_40a_80fb_
swarm:3.50
timestamper:1.30
token-macro:477.vd4f0dc3cb_cf1
trilead-api:2.209.v0e69b_c43c245
variant:70.va_d9f17f859e0
workflow-aggregator:608.v67378e9d3db_1
workflow-api:1382.veca_a_efe062fa_
workflow-basic-steps:1079.vce64b_a_929c5a_
workflow-cps:4175.ve65b_fa_663eed
workflow-durable-task-step:1446.v3efd13441220
workflow-job:1540.v295eccc9778f
workflow-multibranch:810.v6b_6e77da_7058
workflow-scm-step:437.v05a_f66b_e5ef8
workflow-step-api:706.v518c5dcb_24c0
workflow-support:976.vb_d9493c2eb_09
What Operating System are you using (both controller, and any agents involved in the problem)?
jenkins/jenkins:2.504.3-lts-jdk17
Reproduction steps
- Configure a Jenkins pipeline that uses the Coverage plugin's recordCoverage step with any sourceCodeRetention value other than NEVER. Provide a value for the
id parameter like 'my-coverage-report' so you have a specific directory name to look for in Step 4.
- Set up a Cobertura (or other supported) coverage report in the workspace.
- Run the pipeline on a Kubernetes or any distributed agent setup where the agent and controller are separate nodes.
- After the build completes, inspect the root of the agent workspace.
Expected Results
The output folder created by the plugin in the root of the agent workspace with the same name as the provided id parameter is a temporary directory used to to hold individual painted source files before they are all zipped as coverage-sources.zip. It should be deleted from the agent workspace after it is no longer needed, leaving no trace of it in the workspace root.
Actual Results
The temporary directory remains in the root of the agent workspace after every build. On long-lived or reused workspaces the files in this directory are simply overwritten each build, but on fresh workspaces or in environments that inspect workspace contents (e.g. for SCM cleanliness checks or when committing from the workspace) the files appears as unexpected artifacts.
Anything else?
Root Cause
The root cause is in the AgentCoveragePainter.invoke() method in SourceCodePainter.java. The method creates a directory in the agent workspace named after the id parameter (e.g. my-coverage-report), writes painted source .zip files into it, then zips the whole directory into coverage-sources.zip for transport to the controller. After zipping, deleteFolder() is called — but only on the system temp directory used during painting, not on the outputFolder, the workspace directory named after the id parameter. This directory is never deleted.
Suggested Fix
Add outputFolder.deleteRecursive() immediately after the zip step in AgentCoveragePainter.invoke():
@Override
public FilteredLog invoke(final File workspaceFile, final VirtualChannel channel) {
var log = new FilteredLog("Errors during source code painting:");
var workspace = new FilePath(workspaceFile);
try {
var outputFolder = workspace.child(directory);
outputFolder.mkdirs();
Path temporaryFolder = Files.createTempDirectory(directory);
int count = paintedFiles.parallelStream()
.mapToInt(file -> paintSource(file, workspace, temporaryFolder, log))
.sum();
if (count == paintedFiles.size()) {
log.logInfo("-> finished painting successfully");
}
else {
log.logInfo("-> finished painting (%d files have been painted, %d files failed)",
count, paintedFiles.size() - count);
}
var zipFile = workspace.child(SourceCodeFacade.COVERAGE_SOURCES_ZIP);
outputFolder.zip(zipFile);
log.logInfo("-> zipping sources from folder '%s' as '%s'", outputFolder, zipFile);
deleteFolder(temporaryFolder.toFile(), log);
outputFolder.deleteRecursive(); // <-- Add this line
log.logInfo("-> deleted temporary source folder '%s'", outputFolder); // <-- Add this line if logging this action is important
}
catch (IOException exception) {
log.logException(exception,
"Cannot create temporary directory in folder '%s' for the painted source files", workspace);
}
catch (InterruptedException exception) {
log.logException(exception,
"Processing has been interrupted: skipping zipping of source files", workspace);
}
return log;
}
See PR #753: Coverage plugin: delete temporary output folder after zipping painted sources.
Jenkins and plugins versions report
Environment
What Operating System are you using (both controller, and any agents involved in the problem)?
jenkins/jenkins:2.504.3-lts-jdk17
Reproduction steps
idparameter like'my-coverage-report'so you have a specific directory name to look for in Step 4.Expected Results
The output folder created by the plugin in the root of the agent workspace with the same name as the provided
idparameter is a temporary directory used to to hold individual painted source files before they are all zipped as coverage-sources.zip. It should be deleted from the agent workspace after it is no longer needed, leaving no trace of it in the workspace root.Actual Results
The temporary directory remains in the root of the agent workspace after every build. On long-lived or reused workspaces the files in this directory are simply overwritten each build, but on fresh workspaces or in environments that inspect workspace contents (e.g. for SCM cleanliness checks or when committing from the workspace) the files appears as unexpected artifacts.
Anything else?
Root Cause
The root cause is in the AgentCoveragePainter.invoke() method in SourceCodePainter.java. The method creates a directory in the agent workspace named after the id parameter (e.g. my-coverage-report), writes painted source .zip files into it, then zips the whole directory into coverage-sources.zip for transport to the controller. After zipping, deleteFolder() is called — but only on the system temp directory used during painting, not on the outputFolder, the workspace directory named after the id parameter. This directory is never deleted.
Suggested Fix
Add
outputFolder.deleteRecursive()immediately after the zip step inAgentCoveragePainter.invoke():See PR #753: Coverage plugin: delete temporary output folder after zipping painted sources.