1
votes

For reasons, my project requires a Jenkins multibranch pipeline (or similar) where the pipeline definition has to live externally to the SCM, either as a Jenkinsfile or pipeline script. It just needs to be able to scan all branches and follow a predetermined set of steps.

Is this possible?

1
what do you mean with "pipeline definition has to live externally to the SCM" ? - bp2010
The Jenkinsfile should live outside the source code repository. For multibranch pipeline configuration you are required to specify the location of the Jenkinsfile within the source code. My question is asking if this Jenkinsfile (or pipeline) can be stored separate to the source code while still being able to monitor and build all branches. - max
it can live either in the Jenkins job config or within the source code repo - bp2010
@jayfah how it can live in the Jenkins job config? plz explain bit. - ImranRazaKhan
Do you find a solution? - Jack Lu

1 Answers

0
votes

In multi-branch pipeline You should have different Jenkins files in each and every branch to execute the given steps in stages of pipeline. Within the multi-branch pipeline it automatically scan all the branches in your repository and find-out all separated jenkins files using Scan Repository Now option. further under the Scan Repository Log, you will able to find out the log details of every branches..