ImranRazaKhan
ImranRazaKhan

Reputation: 2297

"Pipeline script from SCM" option in multibranch pipeline plugin

I have a Git repository with code I'd like to build and cant add a Jenkinsfile in its root. Is there a way to store the Jenkinsfile in one repository and have it build code from another repository?

As in pipeline plugin we have option "Pipeline script from SCM" and can choose from any other repo.

enter image description here

As in multibranch we have "Build Configuration" which ask for script path only, i couldnt get how i pass repo URL or this path would be absolute path in local directory? Any link for this would be helpful

enter image description here

Upvotes: 1

Views: 4372

Answers (1)

StephenKing
StephenKing

Reputation: 37580

Configure your pipeline with the SCM source pointing to the repo with the Jenkinsfile.

In your pipeline definition there, you can check out other code using the checkout or git steps.

Upvotes: 1

Related Questions