I want to set up a pipeline using a Jenkinsfile, and then use the GitHub Organization Folder plugin to build Pull Requests.
I would like to reuse existing Jobs to do the work, i.e. use several "build" steps in the pipeline.
The problem is that these build steps previously had the branch to build as input, but now this needs to be supplied by the Pipeline mechanism.
I know there is the magic "checkout scm" statement that should be used to check out the correct branch, but since the rest of the "stage" is calling "build", this is not working this way.
Would the suggested solution to my problem be to convert the Jobs to a "Jenkins 2.0 library" ?