Use '!include-raw-expand:' instead of '!include-raw:'
and '!include-raw-verbatim:' instead of '!include-raw-escape:'.
Tags '!include-raw:' and '!include-raw-escape:' are now deprecated.
Change-Id: I3cc5ab9f73d03de1ba09cbc4568366a3bb464a08
Add support for the following configuration options:
- stripSingleParents
- flattentTapResult
- skipIfBuildNotOk
- removeYamlIfCorrupted
Signed-off-by: Kienan Stewart <kstewart@efficios.com>
Change-Id: I387e5cd46fadb54e478627346dc6b4223bda1fc0
Currently, global defaults are merged to custom defaults for job
templates, but not for jobs.
Unify this behaviour.
Change-Id: I26fb2678df7f4225571bf7c3cd4be7041ce99217
Expand variables inside macros without parameters and jobs
the same way as they are expanded inside macros with parameters
and job templates.
Make tags behave inside macros without parameters and jobs
the same way as they are expanded inside macros with parameters
and job templates.
Update or fix affected tests.
Story: 2010588
Story: 2010963
Story: 2010535
Task: 47394
Task: 49069
Task: 47151
Change-Id: Ie05ae6aa386c62ebbf68dd3e2c7001a4e444a47a
LegacyVersion class is removed from newer setuptools package. But
support for legacy versions is added in python-jenkins 1.8.2.
Switch to that implementation.
Fix broken plugin version comparison for legacy versions.
Assume latest plugin version if no plugin version is found.
Story: 2010990
Story: 2009943
Story: 2009819
Story: 2010842
Task: 49236
Task: 44852
Task: 44396
Task: 48448
Change-Id: Id7f0be1c42357454bd9bedcdee3fefb174943d81
'pre-scm-buildstep' wrapper has two modes:
1. Older: no 'buildsteps' element is specified. Build steps is a list under
wrapper name. For example:
- pre-scm-buildstep:
- shell: echo hello
- shell: echo bye
2. Newer: build steps specified inside 'buildsteps' mapping element:
- pre-scm-buildsteps:
buildsteps:
- shell: echo hello
- shell: echo bye
But, when 'preSCMbuildstep' plugin version is equal or higher 0.3, and first
mode is used, it fails.
Fix that.
Change-Id: I010d9f6c5e06ccd8c2723026aae2c60f79917ff4
Test for timeout plugin version before 1.14.
Test for obtaining timeout plugin version by plugin name "Build Timeout".
Test for nodejs-installator plugin, with nodejs version specified.
Change-Id: I87e304b5b45c957a36ae2a109a176bf70ae94136
Story: 2010711
Search for included files relative to the current job first
Change-Id: I34a5743967bf7cbb8b464a0a36abad24180d61e4
Signed-off-by: Max Trunov <trunov_ms@taximaxim.ru>
Currently, Loader.source_path is used for both error locations and
as base for include directory.
But, it is set to "<expanded j2-yaml>" by !j2-yaml: tag, which makes it
unusable as base for include directory.
Make separate source_dir attribute for this usage.
Change-Id: I67669eb42f761e2d76e89992e6ad89480ddd3df0
Folders was not actually tested by tests. Fix tests and add more tests.
Fix bug in code unearthed by now-working tests: defaults were not checked
for job folders.
Task: 49188
Change-Id: I922af7a28b0ec0c99ef3f8a17b3d5a9c10f2dce0
Order of items in job dict depends on implementation specifics.
But test should not fail if implementation change.
Sort it so it won't depend on implementation.
Change-Id: I6decdf1225adcb14f888b787cfc10be66ae52a31
Now, when tag !include-raw: has variable in included file path,
included file is expanded.
And lazy-loading mechanics is removed - now it can be expanded in
the usual way.
Change-Id: I7234d42793a080e7f4186707c4d1d2e9404bd7f3
Change-Id: Ied3cbe3758967659f83637ccea78d834079a1470
Add tokenCredentialId parameter support to generic-webhook-trigger
Change-Id: Ied3cbe3758967659f83637ccea78d834079a1470
In version 2.1045.v4ec3ed07b_e4f Branch API Plugin added options to
configure suppressing SCM trigger. Previously this feature could
be only turned on or off, now it's possible to select what to suppress
and on which branches.
(see https://github.com/jenkinsci/branch-api-plugin/pull/244)
This commit adds support for this option by allowing dictionary syntax
for `suppress-scm-triggering` element:
```
- suppress-scm-triggering:
suppression-strategy: suppress-branch-indexing
branch-regex: ^.*test.*$
```
while preserving support for currently existing syntax:
```
- suppress-scm-triggering: true
```
Change-Id: I5d0b32042fc07d674bf2f26e5b468f051077fb02
Commit 5e61fbaf00 added a new --enabled-only option but that
doesn't work correctly because the xml_jobs_filtered variable isn't
filled with all the jobs in the end. So some jobs are not updated even
if the disabled status was not found. That's fixed now.
Change-Id: I915116cf875e9e20c10ca43175c924b9e4307cca
Rewrite YAML parser, YAML objects and parameters expansion logic to
enable better control over expansion logic.
Broken backward compatilibity:
* More agressive parameter expansion. This may lead to parameters
expanded in places where they were not expanded before.
* Top-level elements, which is not known to parser (such as 'job',
'view', 'project' etc), are now lead to parse failures.
Prepend them with underscore to be ignored by parser.
* Files included using '!include-raw:' elements and having formatting in
it's path ('lazy-loaded' in previous implementation) are now expanded
too.
Use '!include-raw-escape:' for them instead.
See changes in these tests for examples:
tests/yamlparser/job_fixtures/lazy-load-jobs-multi001.yaml
tests/yamlparser/job_fixtures/lazy-load-jobs-multi002.yaml
tests/yamlparser/job_fixtures/lazy-load-jobs001.yaml
* Parameters with template value using itself were substituted as is.
For example: "timer: '{timer}'" was expanded to "{timer}". Now it
leads to recursive parameter error.
See changes in this test for example:
tests/yamlparser/job_fixtures/parameter_name_reuse_default.*
->
tests/yamlparser/error_fixtures/parameter_name_reuse_default.*
* When job group includes a job which was never declared, it was just
ignored. Now it fails: job is missing.
See changes in this test for example:
tests/yamlparser/job_fixtures/job_group_includes_missing_job.*
->
tests/yamlparser/error_fixtures/job_group_includes_missing_job.*
Change-Id: Ief4e515f065a1b9e0f74fe06d7e94fa77d69f273