New answers tagged

0

Note that if you're not actually checking out a Jenkinsfile (if you're coding in the Pipeline Script config window), GIT_BRANCH will be null, and Hedi Nasr's answer will fail (you can access the var with ${env.GIT_BRANCH} instead to avoid the hard fail, but it will still be null). You don't give any information about how you checked out the project, so I'm ...


1

I hope this helps. We had a similar issue and solved it using the below method. Our project contains about 12 or so different components (programs) that we wanted to build in parallel. Because some take longer than others, we decided to break them up into 4 individual "tracks" that would run in parallel. To begin, assume we have an array where each element ...


3

This is quite complicated to achieve in Jenkins. We had a similar issue and here's how we solved it: We have a shared library where we keep our scripts ins ./vars/someScriptName.groovy We created a groovy script that generates the stages. Here's a working pipeline code for you to try it out: def generateITParallelStages(body) { def config = [:] ...


Top 50 recent answers are included