Skip to content

[JENKINS-72593] Publish HTML exception is not throwing error to upstream #567

@jenkins-infra-bot

Description

@jenkins-infra-bot

When `publishReports` function throws IOException, it does not forward the exception to main pipeline script. The exception is just catched within the plugin function and set build result as Failure.

 

The impact for the above is CRITICAL as the main pipeline script should fail the stage than continuing since build result is Failure.

 

public static boolean publishReports(Run build, FilePath workspace, TaskListener listener,
...
} catch (IOException e) {                
    Util.displayIOException(e, listener);
    e.printStackTrace(listener.fatalError("HTML Publisher failure"));                
    build.setResult(Result.FAILURE);
    return true; // THROW ERROR INSTEAD OF RETURING
} 

Originally reported by shereifsrf, imported from: Publish HTML exception is not throwing error to upstream
  • assignee: r2b2_nz
  • status: Open
  • priority: Critical
  • component(s): htmlpublisher-plugin
  • resolution: Unresolved
  • votes: 0
  • watchers: 1
  • imported: 20251211-193728
Raw content of original issue

When `publishReports` function throws IOException, it does not forward the exception to main pipeline script. The exception is just catched within the plugin function and set build result as Failure.

 

The impact for the above is CRITICAL as the main pipeline script should fail the stage than continuing since build result is Failure.

 

public static boolean publishReports(Run<?, ?> build, FilePath workspace, TaskListener listener,
...
} catch (IOException e) {                
    Util.displayIOException(e, listener);
    e.printStackTrace(listener.fatalError("HTML Publisher failure"));                
    build.setResult(Result.FAILURE);
    return true; // THROW ERROR INSTEAD OF RETURING
} 

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions