I have two locations for my CI slaves:
- on-premise I have a lot of slaves: those are located in Freiburg, Germany
- inside cloud (Azure) I have another one: that is in Azure Dublin
Both groups shall use a Peforce proxy: first group shall use an on-premise Perforce proxy in Freiburg, 2nd one shall use a Perforce proxy on the machine itself as the connection between Azure Dublin and our site in Freiburg is far too slow.
So as I'm in the need to contact a localhost based Perforce proxy in Azure I also need a dedicated Perforce based credentialId containing "127.0.0.1:1999". Now the P4 plugin has the problematic behaviour that it tries to contact the proxy given by P4PORT inside the credentialId. Of course normally there shouldn't be any need for a Perforce proxy on the Jenkins server to be installed.
I really wonder how other customers with the combination (Jenkins, Perforce, Azure slaves) get along with this ... maybe they don't have any proxy on the Azure slave. Or they have Jenkins inside Azure as well. Or they accept the slow file transfer. Or they use an Azure data center "right next" to them - not Germany <-> Ireland.
Of course I hope that I can get rid of this Azure system this year but I'm not sure about this.
So the priority is still 'minor' but maybe one can check what this initial communication to the P4PORT inside the credentialId is for. If we know this then we might find a better way to circumvent this need for a local proxy on the Jenkins server: e.g. adding the ability to configure a 2nd master credentialId for this initial communication. I.e. distinguishing between the Perforce proxy that the Jenkins server uses and the one that a slave is using.
Confirm that even for builds that run 100% on the slave the master still sends Perforce commands.
Reproduction Steps:
(1) Create a slave on the P4D server.
(2) Set Jenkins credential to be localhost:1666 (valid on slave but not on master).
(3) Create pipeline job and put a script that runs on the slave in the Pipeline definition add a script that runs on a build slave. For example:
(4) Execute job. Following error is seen: