The following plugin provides functionality available through Pipeline-compatible steps. Read more about how to integrate steps into your Pipeline in the Steps section of the Pipeline Syntax page.

For a list of other such plugins, see the Pipeline Steps Reference page.

Badge

addBadge: Add Badge

Adds one or more badges to the current Pipeline build. Badges are symbols or icons with an optional text message and an optional clickable hyperlink. Badges are often used to provide a visual indicator of additional status information about a Pipeline build. Badges added by addBadge are displayed in the build history of the Pipeline job.

The plugin supports symbols from the ionicons library through the ionicons-api-plugin. More symbols can be added by installing additional plugins, such as font-awesome-api-plugin or custom-folder-icon-plugin. Symbols from plugins are referenced as "symbol-icon-name plugin-plugin-name" and Jenkins Core icons as "icon-icon-name" or "symbol-icon-name". For example, the following are all valid references to symbols:

  • addBadge icon: 'symbol-alert-circle-outline plugin-ionicons-api', text: 'This is an alert symbol'
  • addBadge icon: 'symbol-bar-chart-filled plugin-ionicons-api', text: 'This is a bar chart symbol'
  • addBadge icon: 'symbol-battery-half-sharp plugin-ionicons-api', text: 'This is a half filled battery symbol'
  • addBadge icon: 'symbol-cube', text: 'This is a Jenkins Core symbol'
  • addBadge icon: 'icon-gear', text: 'This is a Jenkins Core icon'

The plugin allows you to also reference images from within Jenkins as well as relative and remote URL:

  • addBadge icon: '/jenkins.png', text: 'This is a relative image'
  • addBadge icon: 'https://foo.bar/icon.png', text: 'This is a remote icon'
  • addBadge icon: 'blue.png', text: 'This is a icon from Jenkins'

The plugin includes icons as GIF images and also supports the 16x16 icons that are offered by Jenkins. These icons are listed in the plugin documentation and are referenced as "image-name.gif". For example, the following are all valid references to icons included with the plugin:

  • addBadge icon: 'completed.gif', text: 'This is a completed symbol'
  • addBadge icon: 'success.gif', text: 'This is a success icon'
  • addBadge icon: 'warning.gif', text: 'This is a warning icon'

Example: Badge with completed icon

The following example adds a "completed" checkmark icon with the text, "This is completed":

addBadge icon: 'completed.gif', text: 'This is completed'

Example: Badge with alarm symbol

The following example adds an alarm symbol with the text, "This is alarming":

addBadge icon: 'symbol-alarm-outline plugin-ionicons-api', text: 'This is alarming'

Example: Badge with red bug symbol

The following example adds a red bug symbol with the text, "This is a red bug with a link", and a link:

addBadge icon: 'symbol-bug plugin-ionicons-api', text: 'This is a red bug with a link', style: 'color: red', link: 'https://issues.jenkins.io/browse/JENKINS-59646'

Example: Text badge with CSS styles

The following example adds text only badge that uses included CSS styles:


    // Add shaded background color with rounded corners
    addBadge text: 'ok', style: 'color: var(--success-color)', cssClass: 'badge-text--background'
    // Add additional border around badge
    addBadge text: '1.0.0', cssClass: 'badge-text--background badge-text--bordered'
    

  • color : String (optional)
  • cssClass : String (optional)

    Optional CSS class for the badge. Classes will be applied to the enclosing <span> of a badge. User can also reference Jenkins built-in CSS classes such as icon-sm - see Jenkins Design Library for more details.

    This plugin includes pre-defined CSS classes for text only badges:

    • badge-text--background - Adds colored background with rounded corners.
    • badge-text--bordered - Adds border that is the same color as the text.

  • icon : String (optional)

    The plugin supports symbols from the ionicons library through the ionicons-api-plugin. More symbols can be added by installing additional plugins, such as font-awesome-api-plugin or custom-folder-icon-plugin. Symbols from plugins are referenced as "symbol-icon-name plugin-plugin-name" and Jenkins Core icons as "icon-icon-name" or "symbol-icon-name" - see Jenkins Design Library for more details. For example, the following are all valid references to symbols:

    • addBadge icon: 'symbol-alert-circle-outline plugin-ionicons-api', text: 'This is an alert symbol'
    • addBadge icon: 'symbol-bar-chart-filled plugin-ionicons-api', text: 'This is a bar chart symbol'
    • addBadge icon: 'symbol-battery-half-sharp plugin-ionicons-api', text: 'This is a half filled battery symbol'
    • addBadge icon: 'symbol-cube', text: 'This is a Jenkins Core symbol'
    • addBadge icon: 'icon-gear', text: 'This is a Jenkins Core icon'

    The plugin allows you to also reference images from within Jenkins as well as relative and remote URL:

    • addBadge icon: '/jenkins.png', text: 'This is a relative image'
    • addBadge icon: 'https://foo.bar/icon.png', text: 'This is a remote icon'
    • addBadge icon: 'blue.png', text: 'This is a icon from Jenkins'

    The plugin includes icons as GIF images and also supports the 16x16 icons that are offered by Jenkins. These icons are listed in the plugin documentation and are referenced as "image-name.gif". For example, the following are all valid references to icons included with the plugin:

    • addBadge icon: 'completed.gif', text: 'This is a completed symbol'
    • addBadge icon: 'success.gif', text: 'This is a success icon'
    • addBadge icon: 'warning.gif', text: 'This is a warning icon'

  • id : String (optional)
    Optional identifier for the badge in case later operations in the Pipeline job need to delete it.
  • link : String (optional)
    Optional URL that will be opened when the user clicks the badge. Can also be a relative path or mailto: reference.
  • style : String (optional)
    Optional CSS style for the badge. Styles will be applied to the enclosing <span> of a badge. User can also reference Jenkins built-in styles such as color: var(--warning-color) - see Jenkins Design Library for more details.
  • text : String (optional)
    Optional text that will be displayed to the user as either short text or hover of an icon. Text can be plain text or HTML depending on the selected Markdown Formatter

addErrorBadge: Add Error Badge

Adds one or more error badges to the current Pipeline build. Error badges text messages with an icon and an optional clickable hyperlink. Error badges are often used to provide a visual indicator of additional status information about a Pipeline build. Error badges added by addErrorBadge are displayed in the build history of the Pipeline job.

Example: Badge with text

The following example adds an error badge with the text, "This is alarming":

addErrorBadge text: 'This is alarming'

Example: Badge with text and link

The following example adds an error badge with the text, "This is alarming" and a link:

addErrorBadge text: 'This is alarming', link: 'https://issues.jenkins.io/browse/JENKINS-59646'

  • color : String (optional)
  • cssClass : String (optional)

    Optional CSS class for the badge. Classes will be applied to the enclosing <span> of a badge. User can also reference Jenkins built-in CSS classes such as icon-sm - see Jenkins Design Library for more details.

    This plugin includes pre-defined CSS classes for text only badges:

    • badge-text--background - Adds colored background with rounded corners.
    • badge-text--bordered - Adds border that is the same color as the text.

  • icon : String (optional)

    The plugin supports symbols from the ionicons library through the ionicons-api-plugin. More symbols can be added by installing additional plugins, such as font-awesome-api-plugin or custom-folder-icon-plugin. Symbols from plugins are referenced as "symbol-icon-name plugin-plugin-name" and Jenkins Core icons as "icon-icon-name" or "symbol-icon-name" - see Jenkins Design Library for more details. For example, the following are all valid references to symbols:

    • addBadge icon: 'symbol-alert-circle-outline plugin-ionicons-api', text: 'This is an alert symbol'
    • addBadge icon: 'symbol-bar-chart-filled plugin-ionicons-api', text: 'This is a bar chart symbol'
    • addBadge icon: 'symbol-battery-half-sharp plugin-ionicons-api', text: 'This is a half filled battery symbol'
    • addBadge icon: 'symbol-cube', text: 'This is a Jenkins Core symbol'
    • addBadge icon: 'icon-gear', text: 'This is a Jenkins Core icon'

    The plugin allows you to also reference images from within Jenkins as well as relative and remote URL:

    • addBadge icon: '/jenkins.png', text: 'This is a relative image'
    • addBadge icon: 'https://foo.bar/icon.png', text: 'This is a remote icon'
    • addBadge icon: 'blue.png', text: 'This is a icon from Jenkins'

    The plugin includes icons as GIF images and also supports the 16x16 icons that are offered by Jenkins. These icons are listed in the plugin documentation and are referenced as "image-name.gif". For example, the following are all valid references to icons included with the plugin:

    • addBadge icon: 'completed.gif', text: 'This is a completed symbol'
    • addBadge icon: 'success.gif', text: 'This is a success icon'
    • addBadge icon: 'warning.gif', text: 'This is a warning icon'

  • id : String (optional)
    Optional identifier for the badge in case later operations in the Pipeline job need to delete it.
  • link : String (optional)
    Optional URL that will be opened when the user clicks the badge. Can also be a relative path or mailto: reference.
  • style : String (optional)
    Optional CSS style for the badge. Styles will be applied to the enclosing <span> of a badge. User can also reference Jenkins built-in styles such as color: var(--warning-color) - see Jenkins Design Library for more details.
  • text : String (optional)
    Optional text that will be displayed to the user as either short text or hover of an icon. Text can be plain text or HTML depending on the selected Markdown Formatter

addInfoBadge: Add Info Badge

Adds one or more info badges to the current Pipeline build. Info badges text messages with an icon and an optional clickable hyperlink. Info badges are often used to provide a visual indicator of additional status information about a Pipeline build. Info badges added by addInfoBadge are displayed in the build history of the Pipeline job.

Example: Badge with text

The following example adds an info badge with the text, "This is interesting":

addInfoBadge text: 'This is interesting'

Example: Badge with text and link

The following example adds an info badge with the text, "This is interesting" and a link:

addInfoBadge text: 'This is interesting', link: 'https://plugins.jenkins.io/custom-folder-icon'

  • color : String (optional)
  • cssClass : String (optional)

    Optional CSS class for the badge. Classes will be applied to the enclosing <span> of a badge. User can also reference Jenkins built-in CSS classes such as icon-sm - see Jenkins Design Library for more details.

    This plugin includes pre-defined CSS classes for text only badges:

    • badge-text--background - Adds colored background with rounded corners.
    • badge-text--bordered - Adds border that is the same color as the text.

  • icon : String (optional)

    The plugin supports symbols from the ionicons library through the ionicons-api-plugin. More symbols can be added by installing additional plugins, such as font-awesome-api-plugin or custom-folder-icon-plugin. Symbols from plugins are referenced as "symbol-icon-name plugin-plugin-name" and Jenkins Core icons as "icon-icon-name" or "symbol-icon-name" - see Jenkins Design Library for more details. For example, the following are all valid references to symbols:

    • addBadge icon: 'symbol-alert-circle-outline plugin-ionicons-api', text: 'This is an alert symbol'
    • addBadge icon: 'symbol-bar-chart-filled plugin-ionicons-api', text: 'This is a bar chart symbol'
    • addBadge icon: 'symbol-battery-half-sharp plugin-ionicons-api', text: 'This is a half filled battery symbol'
    • addBadge icon: 'symbol-cube', text: 'This is a Jenkins Core symbol'
    • addBadge icon: 'icon-gear', text: 'This is a Jenkins Core icon'

    The plugin allows you to also reference images from within Jenkins as well as relative and remote URL:

    • addBadge icon: '/jenkins.png', text: 'This is a relative image'
    • addBadge icon: 'https://foo.bar/icon.png', text: 'This is a remote icon'
    • addBadge icon: 'blue.png', text: 'This is a icon from Jenkins'

    The plugin includes icons as GIF images and also supports the 16x16 icons that are offered by Jenkins. These icons are listed in the plugin documentation and are referenced as "image-name.gif". For example, the following are all valid references to icons included with the plugin:

    • addBadge icon: 'completed.gif', text: 'This is a completed symbol'
    • addBadge icon: 'success.gif', text: 'This is a success icon'
    • addBadge icon: 'warning.gif', text: 'This is a warning icon'

  • id : String (optional)
    Optional identifier for the badge in case later operations in the Pipeline job need to delete it.
  • link : String (optional)
    Optional URL that will be opened when the user clicks the badge. Can also be a relative path or mailto: reference.
  • style : String (optional)
    Optional CSS style for the badge. Styles will be applied to the enclosing <span> of a badge. User can also reference Jenkins built-in styles such as color: var(--warning-color) - see Jenkins Design Library for more details.
  • text : String (optional)
    Optional text that will be displayed to the user as either short text or hover of an icon. Text can be plain text or HTML depending on the selected Markdown Formatter

addSummary: Add Summary

Adds one or more summaries to the current Pipeline build. Summaries are symbols or icons with an optional text message and an optional clickable hyperlink. Summaries are often used to provide a visual indicator of additional status information about a Pipeline build. Summaries added by addSummary are displayed in the build overview of the Pipeline job.

The plugin supports symbols from the ionicons library through the ionicons-api-plugin. More symbols can be added by installing additional plugins, such as font-awesome-api-plugin or custom-folder-icon-plugin. Symbols from plugins are referenced as "symbol-icon-name plugin-plugin-name" and Jenkins Core icons as "icon-icon-name" or "symbol-icon-name". For example, the following are all valid references to symbols:

  • addSummary icon: 'symbol-alert-circle-outline plugin-ionicons-api', text: 'This is an alert symbol'
  • addSummary icon: 'symbol-bar-chart-filled plugin-ionicons-api', text: 'This is a bar chart symbol'
  • addSummary icon: 'symbol-battery-half-sharp plugin-ionicons-api', text: 'This is a half filled battery symbol'
  • addSummary icon: 'symbol-cube', text: 'This is a Jenkins Core symbol'
  • addSummary icon: 'icon-gear', text: 'This is a Jenkins Core icon'

The plugin allows you to also reference images from within Jenkins as well as relative and remote URL:

  • addSummary icon: '/jenkins.png', text: 'This is a relative image'
  • addSummary icon: 'https://foo.bar/icon.png', text: 'This is a remote icon'
  • addSummary icon: 'blue.png', text: 'This is a icon from Jenkins'

The plugin includes icons as GIF images and also supports the 16x16 icons that are offered by Jenkins. These icons are listed in the plugin documentation and are referenced as "image-name.gif". For example, the following are all valid references to icons included with the plugin:

  • addSummary icon: 'completed.gif', text: 'This is a completed symbol'
  • addSummary icon: 'success.gif', text: 'This is a success icon'
  • addSummary icon: 'warning.gif', text: 'This is a warning icon'

Example: Summary with completed icon

The following example adds a "completed" checkmark icon with the text, "This is completed":

addSummary icon: 'completed.gif', text: 'This is completed'

Example: Summary with alarm symbol

The following example adds an alarm symbol with the text, "This is alarming":

addSummary icon: 'symbol-alarm-outline plugin-ionicons-api', text: 'This is alarming'

Example: Summary with red bug symbol

The following example adds a red bug badge symbol the text, "This is a red bug with a link", and a link:

addSummary icon: 'symbol-bug plugin-ionicons-api', text: 'This is a red bug with a link', style: 'color: red', link: 'https://issues.jenkins.io/browse/JENKINS-59646'

  • color : String (optional)
  • cssClass : String (optional)
    Optional CSS class for the badge. Classes will be applied to the enclosing <span> of a summary. User can also reference Jenkins built-in CSS classes such as icon-sm - see Jenkins Design Library for more details.
  • icon : String (optional)

    The plugin supports symbols from the ionicons library through the ionicons-api-plugin. More symbols can be added by installing additional plugins, such as font-awesome-api-plugin or custom-folder-icon-plugin. Symbols from plugins are referenced as "symbol-icon-name plugin-plugin-name" and Jenkins Core icons as "icon-icon-name" or "symbol-icon-name" - see Jenkins Design Library for more details. For example, the following are all valid references to symbols:

    • addSummary icon: 'symbol-alert-circle-outline plugin-ionicons-api', text: 'This is an alert symbol'
    • addSummary icon: 'symbol-bar-chart-filled plugin-ionicons-api', text: 'This is a bar chart symbol'
    • addSummary icon: 'symbol-battery-half-sharp plugin-ionicons-api', text: 'This is a half filled battery symbol'
    • addSummary icon: 'symbol-cube', text: 'This is a Jenkins Core symbol'
    • addSummary icon: 'icon-gear', text: 'This is a Jenkins Core icon'

    The plugin allows you to also reference images from within Jenkins as well as relative and remote URL:

    • addSummary icon: '/jenkins.png', text: 'This is a relative image'
    • addSummary icon: 'https://foo.bar/icon.png', text: 'This is a remote icon'
    • addSummary icon: 'blue.png', text: 'This is a icon from Jenkins'

    The plugin includes icons as GIF images and also supports the 16x16 icons that are offered by Jenkins. These icons are listed in the plugin documentation and are referenced as "image-name.gif". For example, the following are all valid references to icons included with the plugin:

    • addSummary icon: 'completed.gif', text: 'This is a completed symbol'
    • addSummary icon: 'success.gif', text: 'This is a success icon'
    • addSummary icon: 'warning.gif', text: 'This is a warning icon'

  • id : String (optional)
    Optional identifier for the summary in case later operations in the Pipeline job need to delete it.
  • link : String (optional)
    Optional URL that will be opened when the user clicks the summary text. Can also be a relative path or mailto: reference.
  • style : String (optional)
    Optional CSS style for the badge. Styles will be applied to the enclosing <span> of a summary. User can also reference Jenkins built-in styles such as color: var(--warning-color) - see Jenkins Design Library for more details.
  • text : String (optional)
    Optional text that will be displayed next to an icon. Text can be plain text or HTML depending on the selected Markdown Formatter

addWarningBadge: Add Warning Badge

Adds one or more error badges to the current Pipeline build. Warning badges text messages with an icon and an optional clickable hyperlink. Warning badges are often used to provide a visual indicator of additional status information about a Pipeline build. Warning badges added by addWarningBadge are displayed in the build history of the Pipeline job.

Example: Badge with text

The following example adds a warning badge with the text, "This is alarming":

addWarningBadge text: 'This is alarming'

Example: Badge with text and link

The following example adds a warning badge with the text, "This is alarming" and a link:

addWarningBadge text: 'This is alarming', link: 'https://issues.jenkins.io/browse/JENKINS-59646'

  • color : String (optional)
  • cssClass : String (optional)

    Optional CSS class for the badge. Classes will be applied to the enclosing <span> of a badge. User can also reference Jenkins built-in CSS classes such as icon-sm - see Jenkins Design Library for more details.

    This plugin includes pre-defined CSS classes for text only badges:

    • badge-text--background - Adds colored background with rounded corners.
    • badge-text--bordered - Adds border that is the same color as the text.

  • icon : String (optional)

    The plugin supports symbols from the ionicons library through the ionicons-api-plugin. More symbols can be added by installing additional plugins, such as font-awesome-api-plugin or custom-folder-icon-plugin. Symbols from plugins are referenced as "symbol-icon-name plugin-plugin-name" and Jenkins Core icons as "icon-icon-name" or "symbol-icon-name" - see Jenkins Design Library for more details. For example, the following are all valid references to symbols:

    • addBadge icon: 'symbol-alert-circle-outline plugin-ionicons-api', text: 'This is an alert symbol'
    • addBadge icon: 'symbol-bar-chart-filled plugin-ionicons-api', text: 'This is a bar chart symbol'
    • addBadge icon: 'symbol-battery-half-sharp plugin-ionicons-api', text: 'This is a half filled battery symbol'
    • addBadge icon: 'symbol-cube', text: 'This is a Jenkins Core symbol'
    • addBadge icon: 'icon-gear', text: 'This is a Jenkins Core icon'

    The plugin allows you to also reference images from within Jenkins as well as relative and remote URL:

    • addBadge icon: '/jenkins.png', text: 'This is a relative image'
    • addBadge icon: 'https://foo.bar/icon.png', text: 'This is a remote icon'
    • addBadge icon: 'blue.png', text: 'This is a icon from Jenkins'

    The plugin includes icons as GIF images and also supports the 16x16 icons that are offered by Jenkins. These icons are listed in the plugin documentation and are referenced as "image-name.gif". For example, the following are all valid references to icons included with the plugin:

    • addBadge icon: 'completed.gif', text: 'This is a completed symbol'
    • addBadge icon: 'success.gif', text: 'This is a success icon'
    • addBadge icon: 'warning.gif', text: 'This is a warning icon'

  • id : String (optional)
    Optional identifier for the badge in case later operations in the Pipeline job need to delete it.
  • link : String (optional)
    Optional URL that will be opened when the user clicks the badge. Can also be a relative path or mailto: reference.
  • style : String (optional)
    Optional CSS style for the badge. Styles will be applied to the enclosing <span> of a badge. User can also reference Jenkins built-in styles such as color: var(--warning-color) - see Jenkins Design Library for more details.
  • text : String (optional)
    Optional text that will be displayed to the user as either short text or hover of an icon. Text can be plain text or HTML depending on the selected Markdown Formatter

removeBadges: Remove Badges

Removes badges with the given id from the Pipeline build. If no id is given, all badges will be removed from the Pipeline build.

Example: Remove badge with id

The following example removes a badge with the id, "test":

removeBadges id: 'test'

Example: Remove all badges

The following example removes all badges:

removeBadges()

  • id : String (optional)
    Optional identifier for the badge to remove. If not set, all badges will be removed.

removeSummaries: Remove Summaries

Removes summaries with the given id from the build overview. If no id is given, all summaries will be removed from the build overview.

Example: Remove summary with id

The following example removes a summary with the id, "test":

removeSummaries id: 'test'

Example: Remove all summaries

The following example removes all summaries:

removeSummaries()

  • id : String (optional)
    Optional identifier for the summary to remove. If not set, all summaries will be removed.

addHtmlBadge: Add a HTML Badge

This step has been deprecated and should be replaced by addBadge.

  • html : String
  • id : String (optional)

addShortText: Add Short Text

This step has been deprecated and should be replaced by addBadge.

  • text : String
  • background : String (optional)
  • border : int (optional)
  • borderColor : String (optional)
  • color : String (optional)
  • link : String (optional)

createSummary: Create Summary

This step has been deprecated and should be replaced by addSummary.

  • icon : String
  • id : String (optional)
  • text : String (optional)

removeHtmlBadges: Remove HTML Badges

This step has been deprecated and should be replaced by addBadge and removeBadges.

  • id : String (optional)

Was this page helpful?

Please submit your feedback about this page through this quick form.

Alternatively, if you don't wish to complete the quick form, you can simply indicate if you found this page helpful?

    


See existing feedback here.