Skip to content

Commit

Permalink
Fixed JENKINS-10584
Browse files Browse the repository at this point in the history
  • Loading branch information
gboissinot committed Aug 13, 2011
1 parent 1072d3f commit 71f94b1
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
Expand Up @@ -41,10 +41,12 @@ public class CcccPublisher extends Recorder implements Serializable {

private final String metricFilePath;

private final boolean runOnFailedBuild;

@DataBoundConstructor
public CcccPublisher(String metricFilePath) {
public CcccPublisher(String metricFilePath, boolean runOnFailedBuild) {
this.metricFilePath = metricFilePath;
this.runOnFailedBuild = runOnFailedBuild;
}

@Override
Expand All @@ -59,7 +61,7 @@ protected boolean canContinue(final Result result) {
@Override
public boolean perform(AbstractBuild<?, ?> build, Launcher launcher, BuildListener listener) {

if (this.canContinue(build.getResult())) {
if (this.canContinue(build.getResult()) || runOnFailedBuild) {

listener.getLogger().println("Parsing cccc results");

Expand Down
Expand Up @@ -23,10 +23,16 @@
*******************************************************************************/
-->
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define"
xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:f="/lib/form" xmlns:u="/util">
xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:f="/lib/form" xmlns:u="/util">

<f:entry title="Main XML report file path">
<f:textbox name="metricFilePath" value="${instance.metricFilePath}"/>
</f:entry>
<f:entry title="${%Main XML CCCC report file path}">
<f:textbox name="metricFilePath" value="${instance.metricFilePath}"/>
</f:entry>

<f:advanced>
<f:entry title="${%Run even if the build fails}">
<f:checkbox name="runOnFailedBuild" value="${instance.runOnFailedBuild}"/>
</f:entry>
</f:advanced>

</j:jelly>

0 comments on commit 71f94b1

Please sign in to comment.