Git Product home page Git Product logo

htmlpublisher-plugin's Introduction

HTML Publisher Plugin

Join the chat at https://gitter.im/jenkinsci/htmlpublisher-plugin Jenkins Plugin GitHub release Jenkins Plugin Installs

About this plugin

The HTML Publisher plugin is useful to publish HTML reports that your build generates to the job and build pages. It is designed to work with both Freestyle projects as well as being used in a Jenkins Pipeline.

Usage

Installing and enabling the plugin

The HTML Publisher plugin can be installed from any Jenkins installation connected to the Internet using the Plugin Manage screen. Once installed, the plugin can be configured as part of your Jenkins Freestyle job, or used in a Jenkins Pipeline.

Using with Freestyle Jobs

The HTML Publisher plugin can be configured in the post build portion of your Jenkins job.

Configuration

  • HTML directory to archive - the path to the report directory to archive relative to the workspace.
  • Index page[s] - comma-seperated list of files that will be used as index pages. Ant patterns can be used.
  • Index page title[s] (Optional) - optional title(s) for the index pages, which will be used as the tab names. If this is not provided, file names will be used instead.
  • Report title - the name of the report.

Clicking Publishing options... will present you with some additional options:

Publishing Options

  • Keep past HTML reports - whether to keep all archived reports or only the one from the last stable build.
  • Always link to last build - whether to always link to the last build's report regardless of status or only to link to the last successful build's.
  • Allow missing report - if false, build will be marked as failed if the report directory does not exist.
  • Include files - Optional Ant pattern that specifies what files in the report directory to archive. Defaults to archiving all files in the given report directory.
  • Escape underscores in Report Title - if true, underscores in report titles will be escaped to _5F along with other non-alphanumeric characters. If false they will be left as is.

Using with Pipeline Jobs

The HTML Publisher plugin can also be used as part of a Jenkins Pipeline. All you need to do is reference the publishHTML step in your pipeline. e.g.

publishHTML (target : [allowMissing: false,
 alwaysLinkToLastBuild: true,
 keepAll: true,
 reportDir: 'reports',
 reportFiles: 'myreport.html',
 reportName: 'My Reports',
 reportTitles: 'The Report'])

See https://jenkins.io/doc/pipeline/steps/htmlpublisher/ for a reference of available step parameters.

To assist in the creation of the pipeline step, you can use the Snippet Generator and generate the required code. The Snippet Generator can be found at <JENKINS-URL>/pipeline-syntax/

Troubleshooting

If you are having trouble viewing the published HTML reports, check your browser console to see if there are any errors about Content Security Policy. This is often a culprit. If see errors, review https://wiki.jenkins.io/display/JENKINS/Configuring+Content+Security+Policy for instructions on how to resolve.

htmlpublisher-plugin's People

Contributors

akilantech avatar alanharder avatar arius86 avatar arturharasimiuk avatar bitwiseman avatar carlosgv87 avatar carstenlenz avatar daniel-beck avatar daspilker avatar dependabot[bot] avatar fengtan avatar gennadiylitvinyuk avatar jglick avatar jieryn avatar mrooney avatar mschreiber avatar ndeloof avatar oleg-nenashev avatar onigoetz avatar pmouawad avatar rborer avatar rbywater avatar shadamik avatar stefanspieker avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.