Questions tagged [job-dsl]

For questions about the Jenkins 'Job DSL' plugin which are applicable to DevOps. Consider also tagging your question with [jenkins].

Filter by
Sorted by
Tagged with
0
votes
0answers
17 views

Obtaining a list of diffed files in Jenkins multibranch pipeline

I'm working on porting a set of unit test jobs over from scripted pipeline to a multibranch pipeline which is defined in jobDSL by the Config as Code plugin. Things I want to achieve: declare the ...
1
vote
2answers
98 views

Is it possible to pass environment variables to multibranch pipeline job in a time of generating it via DSL?

I want to pass some environment variables in the time of generating the multibranch pipeline, so upon the build start, it will already have these variables. The only thing I found was this envInject ...
0
votes
1answer
40 views

Does Jenkins job create Jenkinsfile? On execution

On creation of a new job(as free style project), and running it, I see that Jenkinsfile is generated in job's workspace, after running the job. But I see that all the pipeline code is commented. ...
2
votes
0answers
218 views

jenkins - gitparam jobdsl - branchFilter

I want to fill branchFilter automatically on Jenkins using JobDSL plugin and language. This is the url of Jenkins Job DSL plugin: https://jenkinsci.github.io/job-dsl-plugin/#path/javaposse.jobdsl....
1
vote
1answer
3k views

Jenkins DSL - Pipeline Job (Unexpected token '$')

I have the following DSL code and I´m getting error on line 13, $class. I guess than everything inside script("""...""") is parsed as plain text to the pipeline definition but I don´t know what´s ...
11
votes
1answer
323 views

Upgrade from job-dsl to Jenkins 2 pipelines

Is there a common practice for migrating a large repository of Jenkins job-dsl to Jenkins2 pipelines? I am looking for ways to test the behaviour of builds, that go a little further than comparison of ...