Skip to content

Instantly share code, notes, and snippets.

@mllrjb
Created October 20, 2016 20:46
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 mllrjb/7bb1a09cc985680e1b3bcfba40ef5ebf to your computer and use it in GitHub Desktop.
Save mllrjb/7bb1a09cc985680e1b3bcfba40ef5ebf to your computer and use it in GitHub Desktop.
Jenkinsfile-gitUrl
#!groovy
node() {
// checkout clean code
stage("checkout") {
checkout scm
sh "git clean -fdx"
}
stage("gitUrl" ) {
// TODO: requires script approval (permission issues)
def gitUrl = scm.getUserRemoteConfigs()[0].getUrl();
println "git url: ${gitUrl}"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment