For questions about the Jenkins 'Job DSL' plugin which are applicable to DevOps. Consider also tagging your question with [jenkins].
Questions tagged [job-dsl]
9 questions
13
votes
2 answers
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 plugin which is not supported by multibranch DSL…
mate200
- 131
- 1
- 4
11
votes
1 answer
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 generated artifact from same code base.
Actually…
ᴳᵁᴵᴰᴼ
- 1,173
- 10
- 22
5
votes
4 answers
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 and using library yields the following error:
No…
David West
- 1,533
- 3
- 18
- 25
3
votes
2 answers
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.dsl.jobs.FreeStyleJob.parameters-gitParam
I want to…
joudaon
- 93
- 2
- 8
2
votes
1 answer
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 wrong or how to escape the $ character.
My…
joudaon
- 93
- 2
- 8
1
vote
1 answer
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 but in a sequential fashion.
Question: Is there…
Alejandro Décimo
- 13
- 3
0
votes
1 answer
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. This is declarative syntax pipeline code.
So, apart…
overexchange
- 189
- 1
- 10
0
votes
1 answer
How to generate the seed job config from the existing jobs?
I'm working on making our jenkins infrastructure more resilient. I've migrated most of our stuff to pipelines, and our jenkins server is deployed by helm/k8s, so they're both under source control. The last bit I need to backup is the job…
mklauber
- 101
0
votes
1 answer
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 me ?
thanks
paolo alborno
- 3
- 3