-
New Feature
-
Resolution: Unresolved
-
Minor
-
None
Jenkins Version: 2.138.2
GitHub Branch Source Plugin Version 2.4.1
Within our Jenkins-Setup we integrated a github.dsl which is able to detect new projects or branches within a project and creates dynamically new Pipeline-Jobs. Every project contains a Jenkinsfile, which defines the build-process.
Within our organization, we would like to set-up an integrate and push mechanism, in order to keep a master-branch clean from any not working source-code.
To lock the jobs within a project, we would like to use the option "lock resource: any-name". If you add a specific name, the locking works just fine. But we would like to set the name of the resource to lock dynamically via either parameters or environments variables.
At the time, the options-block gets evaluated the environment does not seem to be available, hence any env-var is null and cannot be used.
Is it possible to expand the configuration within the github-dsl to send parameters to the generated job, so that these parameters contain values like the project-name or similar, that can be used inside the option-block?
Or is there a way to initialize the environment variables, so that these can be used within the option-block?
Are you talking about the JobDSL plugin?