Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-14454

Cobertura Publisher does not keep settings when used in flexible-publish

XMLWordPrintable

      I am using Run Condition Plugin to run cobertura only on weekends.
      So I also need to use Flexible-Publish to run Publish Cobertura Coverage Report only on weekends.

      I installed flexible-publish and manually created a Flexible-Publish post-build action.
      I then manually copied the details from my original Publish Cobertura Coverage Report action into the flexible-publish version and hit save.

      The <targets> tags are empty in the Flexible-Publish version. If I add them via config.xml and then reload them via Jenkins, everything is fine. However, if I then save my project, the <targts> tags become empty again.

      BEFORE:

             <healthyTarget>
              <targets class="enum-map" enum-type="hudson.plugins.cobertura.targets.CoverageMetric">
                <entry>
                  <hudson.plugins.cobertura.targets.CoverageMetric>CONDITIONAL</hudson.plugins.cobertura.targets.CoverageMetric>
                  <int>74</int>
                </entry>
                <entry>
                  <hudson.plugins.cobertura.targets.CoverageMetric>LINE</hudson.plugins.cobertura.targets.CoverageMetric>
                  <int>67</int>
                </entry>
                <entry>
                  <hudson.plugins.cobertura.targets.CoverageMetric>METHOD</hudson.plugins.cobertura.targets.CoverageMetric>
                  <int>64</int>
                </entry>
              </targets>
            </healthyTarget>
            <unhealthyTarget>
              <targets class="enum-map" enum-type="hudson.plugins.cobertura.targets.CoverageMetric">
                <entry>
                  <hudson.plugins.cobertura.targets.CoverageMetric>CONDITIONAL</hudson.plugins.cobertura.targets.CoverageMetric>
                  <int>0</int>
                </entry>
                <entry>
                  <hudson.plugins.cobertura.targets.CoverageMetric>LINE</hudson.plugins.cobertura.targets.CoverageMetric>
                  <int>0</int>
                </entry>
                <entry>
                  <hudson.plugins.cobertura.targets.CoverageMetric>METHOD</hudson.plugins.cobertura.targets.CoverageMetric>
                  <int>0</int>
                </entry>
              </targets>
            </unhealthyTarget>
            <failingTarget>
              <targets class="enum-map" enum-type="hudson.plugins.cobertura.targets.CoverageMetric">
                <entry>
                  <hudson.plugins.cobertura.targets.CoverageMetric>CONDITIONAL</hudson.plugins.cobertura.targets.CoverageMetric>
                  <int>0</int>
                </entry>
                <entry>
                  <hudson.plugins.cobertura.targets.CoverageMetric>LINE</hudson.plugins.cobertura.targets.CoverageMetric>
                  <int>0</int>
                </entry>
                <entry>
                  <hudson.plugins.cobertura.targets.CoverageMetric>METHOD</hudson.plugins.cobertura.targets.CoverageMetric>
                  <int>0</int>
                </entry>
              </targets>
            </failingTarget>
      

      After

                  <healthyTarget>
                    <targets class="enum-map" enum-type="hudson.plugins.cobertura.targets.CoverageMetric"/>
                  </healthyTarget>
                  <unhealthyTarget>
                    <targets class="enum-map" enum-type="hudson.plugins.cobertura.targets.CoverageMetric"/>
                  </unhealthyTarget>
                  <failingTarget>
                    <targets class="enum-map" enum-type="hudson.plugins.cobertura.targets.CoverageMetric"/>
                  </failingTarget>
      

            capnkeelhauler Capn Keelhauler
            capnkeelhauler Capn Keelhauler
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: