0
votes

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?

1
A single workspace can work against multiple streams, but you have to switch the workspace to the correct stream immediately prior to using it. The command you're looking for is 'client -s -S stream-name'. Of course, the workspace can only be associated with one stream at a time, so if you're trying to run multiple builds simultaneously you'll need multiple workspaces. - Bryan Pendleton

1 Answers

1
votes

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.