Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 

jenkins-notify-plugin

Jenkins plugin sending POST request as a post-build action with configurable JSON payload.

By default payload submitted contains the details of the build (build number, build result, job and log URLs), URLs of artifacts generated, Git branch and commit SHA.

But being a configurable Groovy template it can contain any Jenkins, job or build details you may think of!

Post-build action with JSON payload submitted as POST request

JSON payload is rendered as a Groovy template, having the following variables in scope:

Here's a RequestBin of submitting a default payload:

RequestBin for the default JSON payload

In addition, json( Object ) helper function is available, rendering any Object provided as JSON.

For example:

{
  "items":       ${ json( jenkins.allItems ) },
  "computers":   ${ json( jenkins.computers.collect{ it.displayName }) },
  "moduleRoots": ${ json( build.moduleRoots )},
  "artifacts":   ${ json( build.artifacts )},
  "env":         ${ json( env ) },
  "properties":  ${ json( [ system: System.properties.keySet(), env: env.keySet() ]) }
}

Building and installing the plugin

mvn clean package -s settings.xml
cp -f target/*.hpi ~/.jenkins/plugins

About

Jenkins plugin to send a POST request to any URL when a build is successful, and include details of the build and artifacts generated

Resources

License

Releases

No releases published

Packages

No packages published