Search code examples
jenkinscontinuous-integrationperforceperforce-stream

Poll multiple perforce streams with jenkins


I have a Jenkins server monitoring a Perforce server. Perforce is using streams with mainline model. I am using Jenkins to monitor changes in Perforce and then setting off scripts depending on what is checked in where. This works great on the main stream but I would like to monitor the streams below it as well. When I set up a job who's sole purpose is to monitor other streams it polls only the main stream in spite setting the specifications of the job to the other stream. I suspect it is because the local perforce instance on the machine I am using to run the master jenkins instance is connected to the main stream. If this were the case I could use an additional machine as a slave who is connected to the additional stream strictly for polling. But as there are a lot of streams this seems like an enormous waste of resources. I tried creating a different workspace that is mapped to the stream I want but that didn't work either.

Does anyone know a way I can get around this?


Solution

  • Try the p4 plugin, its an implementation using p4java and supports Streams.

    Either select 'Manual' workspace behaviour and provide a stream path, or use the 'Stream' workspace and Jenkins will create the workspace for you.