GithubHelp home page GithubHelp logo

badge-plugin's Introduction

jenkins-badge-plugin

Jenkins plugin to add badges and build summary entries from a pipeline.

This plugin was forked from the Groovy Postbuild Plugin which will in future use the API from this plugin.

addBadge

This method allows to add build badge icons.

alt text

// puts a badge with the given icon and text.

// addBadge
// ------------------------------------------

/**
 * minimal params
 * 
 * icon: The icon for this badge
 * text: The text for this badge
 */
addBadge(icon, text)

/**
 * all params
 * 
 * icon: The icon for this badge
 * text: The text for this badge
 * id: (optional) The id for this badge. This id can be used to selectively delete badges.
 * link: (optional) The link to be added to this badge
 */
addBadge(icon, text, id, link)


// addInfoBadge
// ------------------------------------------

/**
 * minimal params
 * 
 * text: The info text for this badge
 */
addInfoBadge(text)

/**
 * all params
 * 
 * text: The info text for this badge
 * id: (optional) The id for this badge. This id can be used to selectively delete badges.
 * link: (optional) The link to be added to this badge
 */
addInfoBadge(text, id, link)


// addWarningBadge
// ------------------------------------------

/**
 * minimal params
 * 
 * text: The text for this warning badge
 */
addWarningBadge(text)

/**
 * all params
 * 
 * text: The text for this warning badge
 * id: (optional) The id for this badge. This id can be used to selectively delete badges.
 * link: (optional) The link to be added to this badge
 */
addWarningBadge(text, id, link)


// addErrorBadge
// ------------------------------------------

/**
 * minimal params
 * 
 * text: The text for this error badge
 */
addErrorBadge(text)

/**
 * all params
 * 
 * text: The text for this error badge
 * id: (optional) The id for this badge. This id can be used to selectively delete badges.
 * link: (optional) The link to be added to this badge
 */
addErrorBadge(text, id, link)

removeBadges

Removes badges

// removes badges. If no id is provided all are removed, otherwise only the badges with a matching id
// removeBadges
// ------------------------------------------

/**
 * minimal params
 * 
 */
removeBadges()

/**
 * all params
 * 
 * id: (optional) The id for this badge. This id can be used to selectively delete badges.
 */
removeBadges(id)

addHtmlBadge

Puts a badge with custom html

// puts a badge with a custom html content.
// addHtmlBadge
// ------------------------------------------

/**
 * minimal params
 * 
 * html: The html content to be used for this badge
 */
addHtmlBadge(html)

/**
 * all params
 * 
 * html: The html content to be used for this badge
 * id: (optional) The id for this badge. This id can be used to selectively delete badges.
 */
addHtmlBadge(html, id)

removeHtmlBadges

Removes html badges

// removes html badges. If no id is provided all are removed, otherwise only the badges with a matching id
// removeHtmlBadges
// ------------------------------------------

/**
 * minimal params
 * 
 */
removeHtmlBadges()

/**
 * all params
 * 
 * id: (optional) The id for this badge. This id can be used to selectively delete badges.
 */
removeHtmlBadges(id)

addShortText

Puts a badge with a short text

// puts a badge with a short text, using the default format.
// For Colors supported, Google "html color names".

// addShortText
// ------------------------------------------

/**
 * minimal params
 * 
 * text: The text to add fot this badge
 */
addShortText(text)

/**
 * all params
 * 
 * text: The text to add fot this badge
 * background: (optional) The background-color for this short text
 * border: (optional) The border width for this short text
 * borderColor: (optional) The order color for this short text
 * color: (optional) The color for this short text
 * link: (optional) The link for this short text
 */
addShortText(text, background, border, borderColor, color, link)

createSummary

Puts a badge with a short text

alt text

// creates an entry in the build summary page and returns a summary object corresponding to this entry. The icon must be one of the 48x48 icons offered

// createSummary
// ------------------------------------------

/**
 * minimal params
 * 
 * icon: The icon for this summary
 */
createSummary(icon)

/**
 * all params
 * 
 * icon: The icon for this summary
 * id: (optional) The id for this badge. This id can be used to selectively delete badges.
 * text: (optional) The title text for this summary
 */
createSummary(icon, id, text)


def summary = createSummary(icon)
summary.appendText(text, escapeHtml)
summary.appendText(text, escapeHtml, bold, italic, color)

icons

The badge plugin provides the following additional icons:

alt text alt text alt text alt text alt text alt text alt text alt text alt text alt text alt text alt text alt text alt text

badge-plugin's People

Contributors

alxsap avatar aroskuski avatar bakito avatar brummbq avatar dirk-thomas avatar ikedam avatar imod avatar jglick avatar jieryn avatar marc-guenther avatar ndeloof avatar oleg-nenashev avatar rockwell-bkrische avatar siordache avatar triznakj avatar wolfs avatar

Watchers

 avatar  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.