我已经创建了模板config.xml
,并将其用于我的功能分支作业。
不幸的是,我发现没有加载负责构建后操作的publishers
部分。如果我打开<job url>/config.xml
,我会看到它。但是,如果我打开<job url>/configure
,我就不会看到任何制作后的动作。
以下是我的publishers
部分:
<publishers>
<hudson.tasks.ArtifactArchiver>
<artifacts>build/*.zip,
build/sym/*-iphoneos/*.ipa,build/test/test-results.xml,build/lcov/coverage.xml
</artifacts>
<allowEmptyArchive>false</allowEmptyArchive>
<onlyIfSuccessful>false</onlyIfSuccessful>
<fingerprint>false</fingerprint>
<defaultExcludes>true</defaultExcludes>
</hudson.tasks.ArtifactArchiver>
<hudson.plugins.cobertura.CoberturaPublisher plugin="cobertura@1.9.7">
<coberturaReportFile>build/lcov/coverage.xml</coberturaReportFile>
<onlyStable>false</onlyStable>
<failUnhealthy>false</failUnhealthy>
<failUnstable>false</failUnstable>
<autoUpdateHealth>false</autoUpdateHealth>
<autoUpdateStability>false</autoUpdateStability>
<zoomCoverageChart>false</zoomCoverageChart>
<maxNumberOfBuilds>0</maxNumberOfBuilds>
<failNoReports>true</failNoReports>
<healthyTarget>
<targets enum-type="hudson.plugins.cobertura.targets.CoverageMetric" class="enum-map">
<entry>
<hudson.plugins.cobertura.targets.CoverageMetric>METHOD
</hudson.plugins.cobertura.targets.CoverageMetric>
<int>8000000</int>
</entry>
<entry>
<hudson.plugins.cobertura.targets.CoverageMetric>LINE
</hudson.plugins.cobertura.targets.CoverageMetric>
<int>8000000</int>
</entry>
<entry>
<hudson.plugins.cobertura.targets.CoverageMetric>CONDITIONAL
</hudson.plugins.cobertura.targets.CoverageMetric>
<int>7000000</int>
</entry>
</targets>
</healthyTarget>
<unhealthyTarget>
<targets enum-type="hudson.plugins.cobertura.targets.CoverageMetric" class="enum-map">
<entry>
<hudson.plugins.cobertura.targets.CoverageMetric>METHOD
</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>CONDITIONAL
</hudson.plugins.cobertura.targets.CoverageMetric>
<int>0</int>
</entry>
</targets>
</unhealthyTarget>
<failingTarget>
<targets enum-type="hudson.plugins.cobertura.targets.CoverageMetric" class="enum-map">
<entry>
<hudson.plugins.cobertura.targets.CoverageMetric>METHOD
</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>CONDITIONAL
</hudson.plugins.cobertura.targets.CoverageMetric>
<int>0</int>
</entry>
</targets>
</failingTarget>
<sourceEncoding>ASCII</sourceEncoding>
</hudson.plugins.cobertura.CoberturaPublisher>
<hudson.tasks.junit.JUnitResultArchiver plugin="junit@1.5">
<testResults>build/test/test-results.xml</testResults>
<keepLongStdio>false</keepLongStdio>
<healthScaleFactor>1.0</healthScaleFactor>
</hudson.tasks.junit.JUnitResultArchiver>
<jenkins.plugins.hipchat.HipChatNotifier plugin="hipchat@0.1.9">
<token />
<room>41795</room>
<startNotification>false</startNotification>
<notifySuccess>true</notifySuccess>
<notifyAborted>true</notifyAborted>
<notifyNotBuilt>false</notifyNotBuilt>
<notifyUnstable>true</notifyUnstable>
<notifyFailure>true</notifyFailure>
<notifyBackToNormal>true</notifyBackToNormal>
<startJobMessage />
<completeJobMessage />
</jenkins.plugins.hipchat.HipChatNotifier>
</publishers>
如何修复或至少找到问题原因?
更新 感谢您的评论,我查看了Jenkins的一些日志,然后找到了: ConversionException:没有枚举const类
hudson.plugins.cobertura.targets.CoverageMetric.METHOD : No enum const class hudson.plugins.cobertura.targets.CoverageMetric.METHOD ---- Debugging information ---- message : No enum const class hudson.plugins.cobertura.targets.CoverageMetric.METHOD cause-exception : java.lang.IllegalArgumentException cause-message : No enum const class hudson.plugins.cobertura.targets.CoverageMetric.METHOD class : hudson.plugins.cobertura.targets.CoverageMetric required-type : hudson.plugins.cobertura.targets.CoverageMetric converter-type : com.thoughtworks.xstream.converters.enums.EnumConverter path : /project/publishers/hudson.plugins.cobertura.CoberturaPublisher/healthyTarget/targets/entry/hudson.plugins.cobertura.targets.CoverageMetric line number : 3 class[1] : java.util.EnumMap converter-type[1] : com.thoughtworks.xstream.converters.enums.EnumMapConverter -------------------------------, MissingFieldException: No field 'int' found in class 'hudson.plugins.cobertura.targets.CoverageTarget', MissingFieldException: No field 'entry' found in class 'hudson.plugins.cobertura.CoberturaPublisher', MissingFieldException: No field 'entry' found in class 'hudson.plugins.cobertura.CoberturaPublisher', ConversionException: hudson.plugins.cobertura.targets.CoverageTarget cannot be cast to hudson.util.DescribableList : hudson.plugins.cobertura.targets.CoverageTarget cannot be cast to hudson.util.DescribableList ---- Debugging information ---- message : hudson.plugins.cobertura.targets.CoverageTarget cannot be cast to hudson.util.DescribableList cause-exception : java.lang.ClassCastException cause-message : hudson.plugins.cobertura.targets.CoverageTarget cannot be cast to hudson.util.DescribableList class : hudson.util.DescribableList required-type : hudson.plugins.cobertura.targets.CoverageTarget converter-type : hudson.util.DescribableList$ConverterImpl path : /project/publishers/hudson.plugins.cobertura.CoberturaPublisher/healthyTarget line number : 5 -------------------------------, MissingFieldException: No field 'unhealthyTarget' found in class 'hudson.model.FreeStyleProject', MissingFieldException: No field 'failingTarget' found in class 'hudson.model.FreeStyleProject', MissingFieldException: No field 'sourceEncoding' found in class 'hudson.model.FreeStyleProject'