Carsten Hilber
Carsten Hilber

Reputation: 296

Jenkins multibranch with Jenkinsfile in different repo

If use a multibranch pipeline in Jenkins, I want to have a build for every specific branch that is made inside my code repo. This works like a charm. But I don't want to provide a Jenkinsfile inside my code repo. Instead I want to define a different CI repo which is providing my CI pipeline scripts.

The problem is that the usual config is not containing the scm option like in the normal config.

Normal pipeline config:

enter image description here

Multibranch pipeline config:

enter image description here

Can somebody tell me how to separate the Jenkinsfile from my source code using a multibranch pipeline?

Upvotes: 2

Views: 643

Answers (1)

Carsten Hilber
Carsten Hilber

Reputation: 296

Just in case someone stunmles over the same problem, there is a Jenkins plug-in which brings remote Jenkinsfiles for mutlibranch pipleines: https://plugins.jenkins.io/remote-file/

Upvotes: 1

Related Questions