DSTY - jenkins-std-lib (Shared Library) - Easier way to checkout code and interact with git/svn

DontShavetheYak jenkins-std-lib can be found here on GitHub.

PR for the new package is here.

New features:

  • git.localBranches() - Return List of branch names available locally.
  • git.remoteBranches() - Return List of branch names available remotely.
  • git.tags() - Return List of all tags.
  • git.changedFiles(target: ‘develop’) - Return List of changed files from the current branch to the target branch.
  • git.changeBranch(‘develop’) - Change to a different branch.
  • git.withBranch(‘develop’) { } - Temporarily switch to a branch and run the code inside { }

See the example job

Comments and feedback are always welcome. Will probably merge over the weekend or so.

You can see a demo of other features on youtube or the docs.

2 Likes