I'm using git checkout as
checkout scmGit(
branches: [[name: 'stable-3.x']],
userRemoteConfigs: [[url: 'https://github.com/jenkinsci/git-plugin.git']])
I need to set an environment variable which should be used in a post-checkout hooks.
I tried with environment {MY_ENV=1}
, withEnv(['MY_ENV=1'])
.
But the plugin ignores everything.