How to checkout Jenkinsfile by a custom script?

53 views
Skip to first unread message

Al Le

unread,
Apr 24, 2017, 6:42:57 AM4/24/17
to jenkins...@googlegroups.com
Hello,

I've created a Jenkins job of type "Pipeline" and used an inline pipeline script. Now I'd like to put the script under version control and use the "Pipeline script from SCM" option (I think, I don't have to describe the merits of this).

However, our version control system (CA SCM) is not well supported in Jenkins: I couldn't make the plugin to check out anything.

We do have, however, some scripts for working with CA SCM that allow to check out things reliably.

So, my question is: Is it possible (and how) to have the Jenkinsfile under version control, do the check out for it by a custom script (e.g. using a .bat command) and then have the pipeline executed as if the Jenkinsfile had been extracted by the "Pipeline script from SCM" option?

Thanks!

Al Le

unread,
Apr 24, 2017, 3:43:24 PM4/24/17
to jenkins...@googlegroups.com
> So, my question is: Is it possible (and how) to have the Jenkinsfile under version control, do the check out for it by a custom script (e.g. using a .bat command) and then have the pipeline executed as if the Jenkinsfile had been extracted by the "Pipeline script from SCM" option?

I.e., as I understand it, I need a plugin command to interpret a given Jenkinsfile. Is there one for doing this? Groovy "load" is not what I need because it loads and executed standard Groovy code and not the pipeline syntax.
Reply all
Reply to author
Forward
0 new messages