-
Improvement
-
Resolution: Unresolved
-
Minor
-
Jenkins 2.321, P4 Plugin 1.11.6, Swarm 2020.2
Is it a matter of configuration to get the multibranch source using Helix Swarm to populate jobs using perforce streams?
When the Jenkins Helix Swarm source syncs a stream, it syncs it as if it was a classic branch, ignoring the stream view (import, etc..). Only the non-imported files are synced.
I ran into a similar result when I accidentally tried using the Helix Branches source with a stream path. I discovered I needed to add a Helix Streams source instead. It seems like Helix Swarm sources similarly only support classic depot branches?
Hi cjtallman
I think the problem is that Swarm doesnt actually know about streams. When you define a branch in Swarm its a fixed path. For example:
Therefore it doesnt include the imports just the main stream. When you use Helix Swarm as the branch source you are passed just that one path.
You can explicitly include the imports as seperate paths under the branch but that may have the unwanted side effect that your project includes reviews of the import paths or the mappings may be wrong.
I think the better solution is to define the multibranch source as 'Helix Streams' but there are a lot of caveats:
(1) The branch name in the project in Swarm must be 100% the same as the name of the stream. For example if the stream path is '//stream/Dev1' but the stream name is 'dev' then the branch name in the project must be 'dev'.
(2) There can be no spaces or characters in the branch name that would be URL encoded in the Jenkins job URL.
(3) When triggering from Swarm you call the 'Review' end point for the job passing in the '
{branchName}' in the URL. For example:http://USER:API-TOKEN@JENKINS-SERVER:8080/job/swarmmultibranch/job/{branchName}
/review/build
Regards,
Karl