XUnit post-build actions cannot be saved

This issue is archived. You can view it, but you can't modify it. Learn more

XMLWordPrintable

      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>

            Assignee:
            Unassigned
            Reporter:
            Alex Clifford
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Archived: