-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
Minor
-
Component/s: workflow-cps-plugin
SCM-specific variables such as <code>GIT_COMMIT</code> are not automatically defined as environment variables
Â
However with today's stable Jenkins (2.289.3) and plugins, running this Jenkinsfile:
pipeline {
agent any
stages {
stage('Stage') {
steps {
sh 'echo $GIT_COMMIT'
}
}
}
}
does print out the Git commit, showing the documentation is inaccurate.