Skip to content

Instantly share code, notes, and snippets.

@tizki
Created November 17, 2016 08:09
Show Gist options
  • Save tizki/1ee5133bbe10d910fc56f2f5672df33c to your computer and use it in GitHub Desktop.
Save tizki/1ee5133bbe10d910fc56f2f5672df33c to your computer and use it in GitHub Desktop.
//The following script will add an information badge to the build. (use with groovy post build plugin)
def gitRepo = manager.build.buildVariableResolver.resolve('GIT_REPOSITORY')
def gitBranch = manager.build.buildVariableResolver.resolve('GIT_BRANCH')
manager.addBadge("text.gif", "$gitRepo / $gitBranch")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment