Skip to content

Instantly share code, notes, and snippets.

@jeffweiss
Created February 7, 2017 19:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jeffweiss/7e022c90b22bd77c88b278e3ca391f85 to your computer and use it in GitHub Desktop.
Save jeffweiss/7e022c90b22bd77c88b278e3ca391f85 to your computer and use it in GitHub Desktop.
Jenkins clean checkout
#!groovy
def call() {
checkout([
$class: 'GitSCM',
branches: scm.branches,
extensions: scm.extensions + [[$class: 'WipeWorkspace'], [$class: 'LocalBranch']],
userRemoteConfigs: scm.userRemoteConfigs
])
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment