If I set in Jenkinsfile:
options { skipDefaultCheckout() }
then in steps in pipeline below, variable ${env.GIT_URL} appeared do not available. For example cannot complete step:
stage('Clean checkout') {
steps {
checkout([$class: 'GitSCM', branches: [[name: "master"]],
userRemoteConfigs: [[url: "${env.GIT_URL}"]]])
}
}
in this step variable ${env.GIT_URL} = null due to build console log.
But if you enable back default checkout, so delete:
options { skipDefaultCheckout() }
Then ${env.GIT_URL} became available. Is it expected behaviour? I cannot see Git plugin variables in Pipeline where disabled declarative checkout?