Run DSL Scripts from command line?

1,255 views
Skip to first unread message

Doug Garstang

unread,
May 17, 2016, 10:00:07 AM5/17/16
to job-dsl-plugin
All,

Is there any way to run the DSL groovy scripts from the command line? I have a bunch of jobs I need to update.

Thanks,
Doug

Daniel Spilker

unread,
May 17, 2016, 10:20:23 AM5/17/16
to job-dsl...@googlegroups.com

--
You received this message because you are subscribed to the Google Groups "job-dsl-plugin" group.
To unsubscribe from this group and stop receiving emails from it, send an email to job-dsl-plugi...@googlegroups.com.
To post to this group, send email to job-dsl...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/job-dsl-plugin/b883e347-3a26-49de-bcc0-86fafd1e0711%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Thomas Keller

unread,
May 26, 2016, 4:51:02 AM5/26/16
to job-dsl-plugin
There is also https://github.com/ghale/gradle-jenkins-plugin if you happen to use Gradle as build system, though this is always a few steps behind the most-recent job-dsl release. 

Marc Esher

unread,
Jun 25, 2016, 10:51:42 AM6/25/16
to job-dsl-plugin
We pulled the gradle and Rest bits out of Matt Sheehan's https://github.com/sheehan/job-dsl-gradle-example  and it's been a huge boost for us. As part of our local development workflow, I use this for testing job configuration in a local jenkins before pushing commits. And if I need to push an update or create to a job config on a remote Jenkins before pushing to source control and letting the seed job run, I use this as well. 

It's gold.

Sorin Ionuț Sbârnea

unread,
Dec 1, 2017, 7:57:26 AM12/1/17
to job-dsl-plugin
I am looking for something as the ability to run a DSL script that reconfigures Jenkins view from a remote machine without needing to create a jenkins job for that.

Jenkins already has the functionality to run Groovy scripts, but these are not DSL ones. See https://wiki.jenkins.io/display/JENKINS/Jenkins+Script+Console

Is this possible or doable? 

PS. I observed that someone else asked the same in 2015, but no answer at that time.

Victor Martinez

unread,
Dec 1, 2017, 10:00:39 AM12/1/17
to job-dsl-plugin

konzinov maverick

unread,
Mar 1, 2018, 4:11:14 AM3/1/18
to job-dsl-plugin
Hello.

When running dsl script locally how can i pass parameters to a parameterized script ?

Thks.
Reply all
Reply to author
Forward
0 new messages