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
11
votes
1answer
367 views

How to upgrade job-dsl files 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 ...
6
votes
2answers
3k 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 pipelines, so upon the build start, it will already have these variables. The only thing I found was this envInject ...
3
votes
1answer
506 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....
2
votes
3answers
892 views

How do I load a Jenkins Shared Library in a Jenkins Job DSL seed?

I have a seed job using the plugin Jenkins Job DSL. I also have a shared library. I have tried using the @Library annotation to load the script and the library method. It cannot find the annotation ...
1
vote
1answer
392 views

Jenkins Declarative Pipeline: Can Jenkins execute a dynamic list of jobs?

Context: I have a long dynamic list of builds calls that I am currently executing in parallel successfully. Example below. Problem: In some specific moments it is required to run that list of builds ...
1
vote
1answer
5k 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 ...
0
votes
1answer
598 views

How to inject credentials to python virtual env in jenkins?

I am trying to inject my credentials to a Jenkins Freestyle project. The project is building a python project in virtual environment with "behave" created with ShiningPanda plugin can someone help ...
0
votes
1answer
58 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. ...