In the virtual machine OS environment, there is a variable with the name EXAMPLE_VARIALBE. The variable has a default value which is needed by local tools. In Jenkins jobs, I am using the EnvInject plugin to inject new environment variables but also to overwrite EXAMPLE_VARIALBE with a new value. This is standard action, however, after upgrading the Environment Injector plugin from 2.4.0 to the newest one, it started to generate an error:
ERROR: Not all environment variables could be successfully injected. Check for similarly-named environment variables.
Catching such behavior was introduced due to a ticket: https://issue-redirect.jenkins.io/issue/60559
25669f1
And for unknown reasons, the warning message was changed to error one, which in my opinion is completely incorrect and misleading:
1bd3095
First, the message should be clearer and inform the user of what is really happening. It could be a warning or just information, but not an error.
Second, the case from https://issue-redirect.jenkins.io/issue/60559 should also be caught separately, as the first message concerns a different case.
Originally reported by p_jaskowiec, imported from: EnvInjector plugin generates error when env variable already exists
- status: Open
- priority: Critical
- component(s): envinject-plugin
- resolution: Unresolved
- votes: 2
- watchers: 6
- imported: 20251223-165436
Raw content of original issue
In the virtual machine OS environment, there is a variable with the name EXAMPLE_VARIALBE. The variable has a default value which is needed by local tools. In Jenkins jobs, I am using the EnvInject plugin to inject new environment variables but also to overwrite EXAMPLE_VARIALBE with a new value. This is standard action, however, after upgrading the Environment Injector plugin from 2.4.0 to the newest one, it started to generate an error:
ERROR: Not all environment variables could be successfully injected. Check for similarly-named environment variables.
Catching such behavior was introduced due to a ticket: https://issues.jenkins.io/browse/JENKINS-60559
25669f1
And for unknown reasons, the warning message was changed to error one, which in my opinion is completely incorrect and misleading:
1bd3095
First, the message should be clearer and inform the user of what is really happening. It could be a warning or just information, but not an error.
Second, the case from https://issues.jenkins.io/browse/JENKINS-60559 should also be caught separately, as the first message concerns a different case.
In the virtual machine OS environment, there is a variable with the name EXAMPLE_VARIALBE. The variable has a default value which is needed by local tools. In Jenkins jobs, I am using the EnvInject plugin to inject new environment variables but also to overwrite EXAMPLE_VARIALBE with a new value. This is standard action, however, after upgrading the Environment Injector plugin from 2.4.0 to the newest one, it started to generate an error:
ERROR: Not all environment variables could be successfully injected. Check for similarly-named environment variables.
Catching such behavior was introduced due to a ticket: https://issue-redirect.jenkins.io/issue/60559
25669f1
And for unknown reasons, the warning message was changed to error one, which in my opinion is completely incorrect and misleading:
1bd3095
First, the message should be clearer and inform the user of what is really happening. It could be a warning or just information, but not an error.
Second, the case from https://issue-redirect.jenkins.io/issue/60559 should also be caught separately, as the first message concerns a different case.
Originally reported by p_jaskowiec, imported from: EnvInjector plugin generates error when env variable already exists
Raw content of original issue