After checkout from perforce with
https://wiki.jenkins-ci.org/display/JENKINS/Perforce+Plugin I need to change a file during build, and submit the file after build.
I had expected that the perforce connection and credentials was persisted in the build environment after scm checkout, but that is not the case:
If I have a batch build step like "p4 edit blaha" it returns: "Perforce client error:
Connect to server failed; check $P4PORT."
I can work around that by defining P4PORT and P4USER as global environment variables in Jenkins, but I can not yet do the p4 edit, because the P4CLIENT is unspecified. I do not want that to be a global variable, I want to get the value for the running job.
I could probably retrieve the proper value with groovy script in EnvInject plugin - but I need a bit of guidance from perforce plugin developers, to learn where the value is at run time.
And I would really like the plugin to expose the perforce connection so it can be re-used during the remaiing build