What's the future of Jenkins Job DSL RE: Jenkins 2.0

1,837 views
Skip to first unread message

Chris Proto

unread,
Mar 25, 2016, 5:11:46 PM3/25/16
to job-dsl-plugin
I was hoping one of the project maintainers could speak to what's ahead for this project in light of Jenkins 2.0 and their "Pipeline" plugin.  As a heavy user and fan of this project, I'm left a little anxious and excited at some of the features for Jenkins 2.  

Excited that the Jenkins team seems to have heard a lot of our complaints are are implementing some great stuff that looks directly inspired by projects like Jenkins Job DSL, but also anxious that they haven't gone far enough and that they may even make changes that makes Jenkins Job DSL difficult to use as they try and push users to their Pipeline plugin and Jenkinsfile paradigm.  My biggest fear is that we'll end up being left with either using an inferior choice for pipeline configuration (Jenkins "Pipeline" plugin) or hanging back in Jenkins 1.0 to get the benefits of Jenkins Job DSL.

Anyone else feel the same way? 


Azul Inho

unread,
Mar 27, 2016, 12:29:30 PM3/27/16
to job-dsl-plugin
+1

michael....@sandybeachtech.com

unread,
Mar 28, 2016, 1:06:27 AM3/28/16
to job-dsl-plugin
Absolutely looking for some feedback on this as well.

+1

Azul

unread,
Mar 28, 2016, 6:51:06 AM3/28/16
to job-dsl...@googlegroups.com

I received my Jenkins certified certificate today from the beta exam I took a few months ago. One of the comments I left was in regards to the lack of any questions or mentions of the job DSL. There was a chunk of questions about the workflow plugin, but the adoption of the job DSL is much larger today among people doing serious automation on Jenkins.
I understand that cloudbees are building a business around Jenkins and they may want to shift the conversation and workflow around a DSL they own and maintain, but in my view they are neglecting a very powerful tool that the community uses, extends and rather continue using until there is a strong alternative.

--
You received this message because you are subscribed to a topic in the Google Groups "job-dsl-plugin" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/job-dsl-plugin/lpWYkE1ILao/unsubscribe.
To unsubscribe from this group and all its topics, 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/f7706bec-eb68-41ec-853f-92c34d1b5390%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Victor Martinez

unread,
Mar 28, 2016, 7:45:13 AM3/28/16
to job-dsl-plugin
This question might be interesting to ask either in the jenkins dev or users mailing list.
IMO, as long as the core api doesn't change it won't affect whether 1.X, 2.X are released. If I recall the main aim of 2.0 was to change UI and some cosmetic marketing about Jenkins as Continuous Delivery/Deployment tool.
Personally pipeline as code is awesome but AFAIK it doesn't provide any local testing and this is, IMO, a critical required feature for any X as code paradigm.
There are a bunch of plugins which can be easily integrated with JobDSL via DSL or configure clousure but it cannot be easily integrated by pipeline so that's another blocker in terms for usability and allow people to create their non standard CI/CD/Automation jobs/pipelines.

This is my personal view... which might be wrong...

Cheers

Daniel Spilker

unread,
Mar 29, 2016, 3:35:40 AM3/29/16
to job-dsl...@googlegroups.com
Job DSL is a community effort, so it will live as long as the community is active. Currently the activity is increasing rather than declining. There are new pull request coming in every few days, the mailing list is active and questions on Stack Overflow get answered. And I do not see that this will stop on the Jenkins 2.0 release date.

Job DSL is compatible with Jenkins 2.x, so there is no reason to stay at 1.x. Job DSL will be even better on Jenkins 2.x because Jenkins 2.x will bring Groovy 2.4 (in contrast to Groovy 1.8 in Jenkins 1.x) and Groovy 2.4 has a lot of interesting features for DSL scripting.

Please try the Jenkins 2.0 beta and RC releases with Job DSL and report any issues. The quality of those releases is comparable to the weekly 1.x releases.

1.656 will be the last 1.x weekly release and 1.651 will be the last 1.x LTS release line. Job DSL will most likely switch to the first Jenkins 2.x LTS line to be able to use Groovy 2.4 in Job DSL core.

Daniel

--
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.

Thomas Keller

unread,
May 18, 2016, 3:32:24 AM5/18/16
to job-dsl-plugin
Am Dienstag, 29. März 2016 09:35:40 UTC+2 schrieb Daniel Spilker:
Job DSL is a community effort, so it will live as long as the community is active. Currently the activity is increasing rather than declining. There are new pull request coming in every few days, the mailing list is active and questions on Stack Overflow get answered. And I do not see that this will stop on the Jenkins 2.0 release date.

Are there any plans to extend the new 

node {
}

syntax so that it actually works with the JobDSL plugin's syntax as well, like for example

node {
   dsl {
       ...
   }
}

?

Substance586

unread,
Jul 5, 2016, 2:33:23 PM7/5/16
to job-dsl-plugin
My fear is that this feature is specific to the pipeline plugin and is not a feature of Jenkins that can be exploited natively by the job-dsl.  I hope I'm wrong though.  

Daniel Spilker

unread,
Jul 5, 2016, 2:41:28 PM7/5/16
to job-dsl...@googlegroups.com
The latest release (1.48) allows to use the "Process Job DSLs" build step within a pipeline script, so you can use a pipeline to create other jobs:
node {
    step([
        $class: 'ExecuteDslScripts',
        scriptLocation: [scriptText: 'job("example-2")'],
    ])
    step([
        $class: 'ExecuteDslScripts',
        scriptLocation: [targets: ['jobs/projectA/*.groovy', 'jobs/common.groovy'].join('\n')],
        removedJobAction: 'DELETE',
        removedViewAction: 'DELETE',
        lookupStrategy: 'SEED_JOB',
        additionalClasspath: ['libA.jar', 'libB.jar'].join('\n')
    ])
}

See the wiki for details:

https://github.com/jenkinsci/job-dsl-plugin/wiki/User-Power-Moves#use-job-dsl-in-pipeline-scripts
Daniel

--
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.

Tim Downey

unread,
Jul 5, 2016, 3:03:22 PM7/5/16
to job-dsl...@googlegroups.com
Hi Daniel,

I've tried this, but was wondering if I'm doing something wrong.  If I use ExecuteDslScripts and used SEED_JOB as my lookup strategy, the jobs aren't created.  They report as if they have been created, but they don't seem to be visible from my All Jobs view.  If they have been created, what should the full name of the job be?

If I instead use JENKINS_ROOT as the lookupStrategy, they are created and visible.  I wasn't sure if I was doing something wrong, but my intent would be to use SEED_JOB and then in another node call the job that was created.

Are there any full examples of using ExecuteDslScripts followed by a complete pipeline example showing the jobs being executed?

I admit that I'm still confused about pipeline.  In many ways it seems much less capable than what I can already do with Job DSL.  I'm trying to understand how to put the two together for maximum effect.

Thanks,
Tim


Tim Downey

unread,
Jul 6, 2016, 11:04:47 AM7/6/16
to job-dsl...@googlegroups.com
Ok -- Sorry to reply to my own post, but I was definitely confused.  I was expecting that I would be able to use the ExecuteDslScripts to create my DSL jobs under the "folder" that was created for the pipeline job.  That seems to be incorrect.

In my example, here's my Jenkinsfile.  In this example, the jobs.groovy file will create a job called 'vantage-reports-to-maven-master'.

stage 'JobGeneration'
node {
    checkout([$class: 'GitSCM', branches: [[name: '*/master']],
        doGenerateSubmoduleConfigurations: false, extensions: [[$class: 'CloneOption', noTags: false, reference: '', shallow: true]],
        submoduleCfg: [], userRemoteConfigs: [[credentialsId: 'jenkins-bitbucket',

    step([
        $class: 'ExecuteDslScripts',
        scriptLocation: [targets: ['reports-to-dsl/jobs.groovy'].join('\n')],
        removedJobAction: 'DELETE',
        removedViewAction: 'DELETE',
        lookupStrategy: 'SEED_JOB'
    ])
}

stage 'Dev'
node {
    build 'vantage-reports-to-maven-master'
}

I was hoping that I could create a Pipeline job named "vantage-reports-to" and that the ExecuteDslScripts would create its jobs under the "vantage-reports-to" folder.  This seems to be incorrect and I get warnings about mismatched types if I try.

Here's the warning.

WARNING: Could not create item within class org.jenkinsci.plugins.workflow.multibranch.WorkflowMultiBranchProject

Are my expectations wrong?  Should I be able to create a Pipeline job that uses ExecuteDslScripts to create its own jobs under that folder?

Is anyone else currently using Jenkinsfile to create pipelines with any of their existing dsl jobs?  If so, seeing an example would be great.

Thanks!
Tim



Daniel Spilker

unread,
Jul 7, 2016, 3:01:20 AM7/7/16
to job-dsl...@googlegroups.com
@Tim:

Start a new thread for a new question, this thread is about "the future of Jenkins Job DSL".

You can not create jobs in a WorkflowMultiBranchProject folder, that folder is a "magic" computed folder managed by the multi-branch pipeline job type. You can not use "SEED_JOB" with that job type, only with the plain Pipeline job type.

Daniel

Reply all
Reply to author
Forward
0 new messages