Commit 1216581
committed
[Build] Read parameters from Jenkins-files and create jobs dynamically
When creating a pipeline-job the Jenkins JobDSL, by default, doesn't
consider the parameters defined within the pipeline-job's Jenkinsfile.
Therefore parameters defined only within the Jenkinsfile are only added
to the job's definition after the pipeline was executed first (and
updated on subsequent executions, if changes are applied).
In order to make parameters available even on the first run, instead
they have to be defined in the groovy-file that uses the Jenkins Job-DSL
to define the pipeline-job.
This is an long standing and known, yet unsolved issue in Jenkins:
- https://issues.jenkins.io/browse/JENKINS-41929
The current solution to define parameters in the job-definition has the
drawback that an important part of the pipeline is defined in another
file, which makes maintenance more difficult.
This implements an enhanced work-around, allowing to define the
parameters within a pipeline's Jenkinsfile again:
During the definition of a pipeline-job, it's Jenkinsfile file is parsed
and its AST is searched for parameter definitions. All encountered
parameters are translated dynamically into corresponding parameters of
the job definition.
With this new possibility all parameters have their definition moved
into their pipeline's Jenkinsfile.
Furthermore this adds a JenkinsFile for the seedJob of the RelEng JIPP,
which was previously manually defined as a free-style job.
That seedJob pipeline also creates jobs dynamically from all pipeline
files in the corresponding folders. It's therefore sufficient to just
add a JenkinsFile and not necessary anymore to explicitly add a
corresponding pipeline job definition anywhere.
This also ensures a unified naming schema of all jobs that corresponds
to the name of the pipeline's Jenkinsfile.1 parent c51fa4f commit 1216581
File tree
22 files changed
+384
-432
lines changed- JenkinsJobs
- AutomatedTests
- Builds
- Cleanup
- Releng
- SmokeTests
- YBuilds
22 files changed
+384
-432
lines changedThis file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
1 | 4 | | |
2 | 5 | | |
3 | 6 | | |
| |||
6 | 9 | | |
7 | 10 | | |
8 | 11 | | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
9 | 15 | | |
10 | 16 | | |
11 | 17 | | |
| |||
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
303 | 303 | | |
304 | 304 | | |
305 | 305 | | |
306 | | - | |
| 306 | + | |
307 | 307 | | |
308 | 308 | | |
309 | 309 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
1 | 4 | | |
2 | 5 | | |
3 | 6 | | |
4 | 7 | | |
5 | 8 | | |
6 | 9 | | |
7 | 10 | | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
8 | 18 | | |
9 | 19 | | |
10 | 20 | | |
| |||
18 | 28 | | |
19 | 29 | | |
20 | 30 | | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | 31 | | |
26 | 32 | | |
27 | 33 | | |
| |||
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
1 | 4 | | |
2 | 5 | | |
3 | 6 | | |
| |||
11 | 14 | | |
12 | 15 | | |
13 | 16 | | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
14 | 23 | | |
15 | 24 | | |
16 | 25 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
1 | 4 | | |
2 | 5 | | |
3 | 6 | | |
| |||
0 commit comments