[ https://issues.jenkins-ci.org/browse/JENKINS-12837?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=159322#comment-159322 ]
SCM/JIRA link daemon commented on JENKINS-12837: ------------------------------------------------ Code changed in jenkins User: Rob Petti Path: src/main/java/hudson/plugins/perforce/PerforceSCM.java http://jenkins-ci.org/commit/perforce-plugin/5befc6822dbb7af0fb0f18a535efa0c826b89838 Log: [FIXED JENKINS-12837] use full build environment for substitutions, not just job parameters > Using a variable injected during "Prepare envrionment" stage doesn't work for > Perforce Label during SCM > ------------------------------------------------------------------------------------------------------- > > Key: JENKINS-12837 > URL: https://issues.jenkins-ci.org/browse/JENKINS-12837 > Project: Jenkins > Issue Type: Bug > Components: envinject, perforce > Affects Versions: current > Environment: Windows > Reporter: Brian Freed > Assignee: gbois > Priority: Blocker > > I am trying to inject a variable from a file which will tell a Jenkins test > job what perforce label it should use during SCM > My file is named change.properties and looks like this: > p4.changelist=386494 > In the test job, I have clicked the 'Prepare an environment for the job' > section and then added the file location in the 'Properties File Path' box > In the Perforce section, I am setting the perforce Label to be > GPTCDTEST${p4.changelist} > However when I run the job, I get this error: > Invalid changelist/client/label/date '@GPTCDTEST${p4.changelist}'. > which makes me think that it wasn't able to pick up the p4.changelist > variable I injected. > I have been able to do this by having an upstream job trigger the test job > with parameters from the file, and this works fine, but I want to be able to > have the job run on it own without requiring the upstream job. > I also tried just inserting this variable in the 'Properties Content' > section, but Perforce still can't find it: > [EnvInject] - Injecting as environment variables the properties content > p4.changelist=322332 > [EnvInject] - Variables injected successfully. > ... > com.tek42.perforce.PerforceException: Errors encountered while force syncing: > error: Invalid changelist/client/label/date '@GPTCDTEST${p4.changelist}'. > Is there an issue with linking up a variable from the Prepare Environment > section to the perforce SCM section? -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jenkins-ci.org/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira