The picture of the environment variables screen was the key item. I've never used that page to see the environment variables which were set during the job.
The git plugin injects environment variables into the job but does not inject them in such a way that they are visible in that page. My example job shows that the environment variables are set by the plugin and are usable by "bat", "shell" and "cross-platform shell" steps. However, my "Environment Variables" page for each job does not show those variables.
Since the URL to that environment variables page is called "injectedEnvVars", I assume the git plugin is adding environment variables to the job by a different technique than other plugins.
Can you describe your use case more deeply? Are you reading the values of those environment variables from a program later?
Please provide more details so that others can duplicate the bug. I attempted to duplicate the bug with the following steps:
More details are in the commit message for the job that performs that check.
I see the environment variables output for my job as:
Please provide more details to duplicate the problem you're seeing. I don't know how the job looks after DSL generates a freestyle job.