Skip to content

Node.js server that serves build status badges from Jenkins API

Notifications You must be signed in to change notification settings

sippeangelo/jenkinshield

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jenkinshield

Generate build status and test case badges from Jenkins builds with customizability. Using gh-badges

Install

npm install -g jenkinshield

Usage

  Usage: jenkinshield [options]

  Options:

    -h, --help           output usage information
    -V, --version        output the version number
    -u, --url <url>      Jekins URL (http://username:password@server:port)
    -p, --port [number]  Port [2323]

Use the same URL to your build as Jenkins does, just change the port (if you happen to be running jenkinsshield on the same server).

Build Status

http://server:2323/job/<your job>/<build number>
http://server:2323/job/<your job>/lastBuild
http://server:2323/job/<your job>/lastStableBuild
http://server:2323/job/<your job>/lastSuccessfulBuild

<your job> passing <your job> unstable <your job> failing

Test Results

http://server:2323/job/<your job>/<build number>/testReport?text=tests
http://server:2323/job/<your job>/lastBuild/testReport?text=tests
http://server:2323/job/<your job>/lastStableBuild/testReport?text=tests
http://server:2323/job/<your job>/lastSuccessfulBuild/testReport?text=tests

tests 10 / 10 tests 9 / 10

Customize

The server accepts a few query strings that allow you to customize your badge.

Parameter Values Description
text any Replaces the text on the badge. Default is the display name of the job.
template plastic, flat, flat-squared Changes theme of the badge.

Examples

http://server:2323/job/<your job>/lastBuild

build passing

http://server:2323/job/<your job>/lastBuild/testReport?text=tests&theme=plastic

tests 10 / 10

About

Node.js server that serves build status badges from Jenkins API

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published