-
Bug
-
Resolution: Unresolved
-
Minor
-
None
-
Jenkins 1.596.2
Environment Injector Plugin 1.92
GIT plugin 2.4.0
Variables provided by Git plugin (tested with GIT_COMMIT) are not accessible in EnvInject plugin even if applied after SCM phase (Build Environment -> Inject environment variables to the build process).
Sample Groovy code used in "Evaluated Groovy script":
[GIT_COMMIT_SHORT: GIT_COMMIT]
ends with: "[EnvInject] - [ERROR] - Problems occurs on injecting env vars as a build wrap: null". It works wine with JOB_NAME or similar. GIT_COMMIT variable is later accessible in a build step.
Sample Use case: Get a short version of Git commit SHA fetch by a job.
May be related to JENKINS-29349.