-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
Jenkins 1.580.3
perforce plugin 1.3.33
Environment Injector (EnvInject) plugin 1.90
After recently upgrading from 1.3.27 to 1.3.33, job polling appears to be failing with unresolved macro issues trying to poll when using perforce plugin in conjunction with Environment Injector plugin.
I have a global password in the global config. In the job config, I have that variable name, let's say MY_P4PASSWD, set in the field for the perforce password. Also in the job config I have the "Inject passwords to the build as environment variables" and the "Global passwords" box checked under that.
The variable is correctly resolved during the checkout, however no longer resolves during polling or during labeling. It all worked fine in 1.3.27. Also I reverted plugin version and tested that it wasn't any other variable in configuration.
Snippet of stack trace from polling:
FATAL: <${MY_P4PASSWD}>: Found unresolved macro at '${MY_P4PASSWD}'
hudson.plugins.perforce.utils.ParameterSubstitutionException: <${MY_P4PASSWD}>: Found unresolved macro at '${MY_P4PASSWD}'
at hudson.plugins.perforce.utils.MacroStringHelper.checkString(MacroStringHelper.java:154)
at hudson.plugins.perforce.utils.MacroStringHelper.substituteParameters(MacroStringHelper.java:102)
at hudson.plugins.perforce.PerforceSCM.getDecryptedP4Passwd(PerforceSCM.java:2700)
at hudson.plugins.perforce.PerforceSCM.getDepot(PerforceSCM.java:487)
at hudson.plugins.perforce.PerforceSCM.compareRemoteRevisionWith(PerforceSCM.java:1310)
at hudson.scm.SCM.poll(SCM.java:401)
@Caleb
I definitely should check it on my own, because I've never thought such case may work
Build wrappers should not inject variables outside the build in general, but there could be hacks in EnvInject plugin or missed routines in Perforce plugin. On the other hand, in 1.3.27 polling used to ignore missing variables, so probably you polling procedures weren't completely correct..
Have you updated Jenkins core or EnvInject plugin together with Perforce plugin?