jenkinsci / jenkinsci/postbuild-task-plugin

[JENKINS-26747] XUnit post-build actions cannot be saved

Open
#53 0 comments 0 reactions 0 assignees View on GitHub
component:postbuild-task-plugin imported-jira-issue priority:major resolution:unresolved
Dominant language
Java
Stars
8
Forks
19
Avg merge
38m
Merged PRs (30d)
1

Description

Since updating a few minor versions to the latest I've noticed that when saving a Project's Configure page existing XUnit post-build actions get cleared and will not accept the values submitted.

The config.xml for a working project has the following for the XUnit section:

"xunit@​1.61">



sstesting/logs/testsuite.xml
false
true
true
true
















1

If I edit an existing project or clone our template to a new Project this section gets replaced with:

    "xunit@​1.61">
















1

Our builds then fail because we require the test report to be written.

The workaround is to edit the correct values back into config.xml on the Jenkins master server and reload the configuration. It seems like the web interface's interaction with the REST API is breaking for this particular post-build action.

Any thoughts>

---
Originally reported by alexclifford, imported from: XUnit post-build actions cannot be saved


  • status: Open
  • priority: Major
  • component(s): postbuild-task-plugin
  • label(s): jenkins
  • resolution: Unresolved
  • votes: 0
  • watchers: 1
  • imported: 20251223-222157

Raw content of original issue

Since updating a few minor versions to the latest I've noticed that when saving a Project's Configure page existing XUnit post-build actions get cleared and will not accept the values submitted.

The config.xml for a working project has the following for the XUnit section:



<xunit plugin="xunit@1.61">

<types>
<PHPUnitJunitHudsonTestType>
<pattern>sstesting/logs/testsuite.xml</pattern>
<skipNoTestFiles>false</skipNoTestFiles>
<failIfNotNew>true</failIfNotNew>
<deleteOutputFiles>true</deleteOutputFiles>
<stopProcessingIfError>true</stopProcessingIfError>
</PHPUnitJunitHudsonTestType>
</types>
<thresholds>
<org.jenkinsci.plugins.xunit.threshold.FailedThreshold>
<unstableThreshold></unstableThreshold>
<unstableNewThreshold></unstableNewThreshold>
<failureThreshold></failureThreshold>
<failureNewThreshold></failureNewThreshold>
</org.jenkinsci.plugins.xunit.threshold.FailedThreshold>
<org.jenkinsci.plugins.xunit.threshold.SkippedThreshold>
<unstableThreshold></unstableThreshold>
<unstableNewThreshold></unstableNewThreshold>
<failureThreshold></failureThreshold>
<failureNewThreshold></failureNewThreshold>
</org.jenkinsci.plugins.xunit.threshold.SkippedThreshold>
</thresholds>
<thresholdMode>1</thresholdMode>
</xunit>

If I edit an existing project or clone our template to a new Project this section gets replaced with:



    <xunit plugin="xunit@1.61">

<types/>
<thresholds>
<org.jenkinsci.plugins.xunit.threshold.FailedThreshold>
<unstableThreshold></unstableThreshold>
<unstableNewThreshold></unstableNewThreshold>
<failureThreshold></failureThreshold>
<failureNewThreshold></failureNewThreshold>
</org.jenkinsci.plugins.xunit.threshold.FailedThreshold>
<org.jenkinsci.plugins.xunit.threshold.SkippedThreshold>
<unstableThreshold></unstableThreshold>
<unstableNewThreshold></unstableNewThreshold>
<failureThreshold></failureThreshold>
<failureNewThreshold></failureNewThreshold>
</org.jenkinsci.plugins.xunit.threshold.SkippedThreshold>
</thresholds>
<thresholdMode>1</thresholdMode>
</xunit>

Our builds then fail because we require the test report to be written.

The workaround is to edit the correct values back into config.xml on the Jenkins master server and reload the configuration. It seems like the web interface's interaction with the REST API is breaking for this particular post-build action.

Any thoughts>

  • environment: Jenkins ver. 1.598 on Ubuntu 12.04

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.