Search code examples
jenkinsjenkins-pluginsjenkins-job-dsl

point to Git repository as source for Jenkins Job DSL job?


I have the option of file system or embedded script - how can I point to a Git repo?

enter image description here

I am asking specifically about the Job DSL not Multibranch Pipelines.


Solution

  • Just add a standard SCM step to your job configuration. In that step, check out the needed repository and branch that contains the DSL script.

    The "DSL Scripts" argument then has to point to the script that you checked out in that step.