In my project's Source Code Management : Perforce : Project Details : Client View Type field, parameter substitution works in the View Map field, but it does not work in the View Map from File file.
For example:
1) In your Jenkins project, create a String Parameter VERSION and set it to the string 6.2
2) In the View Map field, utilize this parameter, such as
//depot/myapp/version_{$VERSION}/client/...
Observation: This expands correctly as expected
3) Switch to View Map from File, and enter this parameter:
//depot/myapp/version_{$VERSION}/myapp_build_mapping.txt
Observation: {$VERSION} is not expanded prior to use, resulting in the following warning:
Warning: Client Spec line invalid, ignoring. (//depot/myapp/version_{$VERSION}/myapp_build_mapping.txt - no such file(s).)
Workaround: Use a build mapping file that is at a fixed depot path
Notes: It would be nice if parameter expansion could happen on this before it is used. That way, I can specify a project-specific build mapping. This is useful for working on multiple versions of an application in parallel using feature branches, so that the 6.2 feature team can check in a change to this mapping, and when the 6.2 changes merge into the main codeline, the 6.3 team's mapping will be updated when they do a catch-up from main.
[JENKINS-21721] Perforce 'View Map from File' field does not perform parameter substitution
Environment |
Original:
Jenkins 1.542 Perforce Plugin <not sure, probably latest> |
New:
Jenkins 1.542 Perforce Plugin 1.3.26 |
Resolution | New: Not A Defect [ 7 ] | |
Status | Original: Open [ 1 ] | New: Resolved [ 5 ] |
Workflow | Original: JNJira [ 153721 ] | New: JNJira + In-Review [ 194665 ] |
Component/s | New: p4-plugin [ 19224 ] | |
Component/s | Original: perforce-plugin [ 15506 ] |