-
Type:
New Feature
-
Resolution: Won't Fix
-
Priority:
Minor
-
Component/s: git-plugin
-
None
-
Environment:Jenkins 2.516.1
Git plugin Version 5.7.0
Windows 11
My git repository utilizes a smudge script (written in Perl) that checks the values of some environment variables.
Â
When using the checkout command, the smudge script does not receive the environment variable set earlier in the job. If I replace the checkout command with the raw git commands the environment variable is seen.
Basic example of what my job is doing:
Â
env.Who_Is_Awesome = "Jenkins_And_Git_Team" checkout([$class: 'GitSCM', branches: [[name: "main"]], Â doGenerateSubmoduleConfigurations: false, extensions: [ [$class: 'CheckoutOption', timeout: 60], [$class: 'CloneOption', depth: 1, noTags: false], [$class: 'SubmoduleOption', disableSubmodules: false, parentCredentials: true, recursiveSubmodules: true, reference: '', trackingSubmodules:false]], submoduleCfg: [], userRemoteConfigs: [[url: "https://my_git_reference.git", credentialsId: 'myGitCreds']] ])
Â
Â
In my smudge script I check the env var "Who_Is_Awesome" and get nothing. If I replace the checkout command with raw git commands then the smudge sees the environment variable.
Â