Created
October 20, 2016 20:46
-
-
Save mllrjb/7bb1a09cc985680e1b3bcfba40ef5ebf to your computer and use it in GitHub Desktop.
Jenkinsfile-gitUrl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!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