How about supporting different types of jobs
dinukadesilva opened this issue · comments
I really wanna get this because of pipeline jobs. For that, if we had a way to parse a groovy script and get the job created, it would be amazing. Also, with that we can create the parameters in the job config, so, that it works as expected from the first run itself.
I would also like to contribute this if no one is already working on the same.
Yeah, I'm definitely not working on it.
I just use Jenkinfiles
to configure all my jobs these days. Combine that with the GitHub Branch Source Plugin and it's automated the vast majority of my Jenkins configuration.
I'd check out those first (assuming you're on GitHub Enterprise or something), if not you might consider building the integration as a Jenkins plugin. Parsing groovy in Javascript is going to be horrible, might be easier to tackle it from the Jenkins/Java/Plugin side.
Assuming none of that works I'd probably need to know more about what you actually want to do. I've avoided adding overly specific plugin support or opinionated interfaces because they're hard to make reusable without a ton of experience (I haven't worked on 100s or even 10s of CI setups, so I don't think I can generalize well).
Honestly the scope of this library is pretty limited, mostly to just expose an HTTP interface to Jenkins that works around some of its warts.
@silas
My thought was how letting this library to create jobs by giving a Jenkinfiles
path as a parameter.
If Jenkins created an API to accept a Jenkinfiles I'd be down to implement it, but it's not something I want to maintain in this library.