@@ -13,6 +13,12 @@ If you already have the source code checked out then you can ignore step 1.
What's going on here is that there's a static main method that can run the DSL, you just have to give it a filename. It'll output all the jobs' XML to the current directory. Likewise, if you use "using" (the templates-like feature) it'll look in the current directory for a file with the name of the job appended with ".xml" at the end of it.
By default the current directory is added to the classpath to be able to import classes. When using sub-directories for
scripts, the classpath differs compared to running in Jenkins where the DSL script's directory is added to the
classpath. Add the `-j` command line option to use the same behavior as when running in Jenkins:
java -jar $DSL_JAR -j sample.dsl.groovy
# Generate a Job config.xml without having to fire up Jenkins
1. Add some job dsl content to a file, say job.dsl
1. Run the gradle command: ./gradlew run -Pargs=job.dsl