Reputation: 2297
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.
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
Upvotes: 1
Views: 4372
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