Using Perforce in a Complex Jenkins Pipeline
Hi, I’m Guy ‘RiotSomeOtherGuy’ Kisel, a software engineer at Riot. You might remember me from Running an Automated Test Pipeline for the League Client Update. I work on the Riot Developer Experience team – our responsibilities include providing Jenkins servers and related infrastructure for engineers to use for building, testing, and shipping their software to the millions of players that play League of Legends.
We’re sort of like a traditional build team, except that we provide self-service tools for engineers to manage their own builds instead of building their software for them. We recently encountered issues integrating Jenkins Pipeline and Perforce and wanted to share our experiences and eventual workarounds. Integrating Pipeline with Git is relatively straightforward, but integrating Perforce presented us with an entirely new set of problems, like conflicts between concurrent jobs on the same build node, and difficulty syncing the right changelist multiple times in a single pipeline.
We’ll start with a bit of context about Git, Perforce, and Jenkins. Git is popular across the tech industry, but Perforce is somewhat less common outside of specific industries like gaming. Jenkins is also very popular, though it’s facing heavy competition from alternatives such as Travis CI.
Then we’ll dive into the problems we encountered with integrating Jenkins Pipelinewith Perforce, including solutions we developed for each problem. And finally, we’ll conclude with some general learnings we discovered along the way.