Skip to content

Instantly share code, notes, and snippets.

@antrew
Created January 31, 2017 21:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save antrew/ae911936bbb5f80c226614aba39e5052 to your computer and use it in GitHub Desktop.
Save antrew/ae911936bbb5f80c226614aba39e5052 to your computer and use it in GitHub Desktop.
#!groovy
def handleCheckout = {
sh "echo 'Checking out given branch...'"
checkout scm
}
node() {
stage('setup') {
sh "env | sort"
handleCheckout()
sh "git branch -vv"
}
stage('test') {
sh "echo 'Throw in some tests here'"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment