The Perforce plugin does not substitute all variables when polling for changes. I use variables in the following fields: "Workspace (client)" and "View Map".
The plugin replaces only the variable ${JOB_NAME} with the correct value, but ignores ${NODE_NAME} and ${USERNAME} (and perhaps some other variables too). Using %USERNAME% instead of ${USERNAME} does not work.
The polling log looks like:
Started on 14.08.2012 16:36:33
Looking for changes...
Using node: Jenkins
Using master perforce client: ${USERNAME}admin.test${NODE_NAME}
[JENKINS_HOME] $ "c:\Program Files\P4\p4.exe" workspace -o ${USERNAME}admin.test${NODE_NAME}
[JENKINS_HOME] $ "c:\Program Files\P4\p4.exe" counter change
[JENKINS_HOME] $ "c:\Program Files\P4\p4.exe" -s changes -s submitted //${USERNAME}admin.test
/...@26326,@26325
No changes found.
When I do not use polling (starting the job manually), the plugin has no problem to create and sync the workspace.
[JENKINS-14787] Perforce plugin does not substitute all variables when polling for new changes
Environment | Original: Windows 7 Professional 64-Bit, Jenkins 1.471, Winstone servlet engine | New: Windows 7 Professional 64-Bit, Jenkins 1.471, Winstone servlet engine, Perforce plugin 1.3.17 |
Assignee | New: Rob Petti [ rpetti ] |
Priority | Original: Critical [ 2 ] | New: Major [ 3 ] |
What is USERNAME supposed to be set to? That's not a standard Jenkins environment variable.