Added support of multilevel type for extended choice parameter
dded jenkins_jobs.modules.helpers.check_mutual_exclusive_data_args decorator that used for validating data arguments
in jenkins_jobs.modules.parameters.extended_choice_param method.
Change-Id: Id8c0f8090dd99022501558cafa5b1c27e6675425
Task: #41320
The 'mock' package is imported in 'tests.base'. Whenever possible
'tests.base' prefers 'unittest.mock' over 'mock' (which is the case on
Python 3.3+). Importing 'mock' together with 'unittest.mock' causes
unexpected behavior that results in exceptions when running tests, at
least on Python 3.6.12, like:
> File "/usr/lib/python3.6/unittest/mock.py", line 1196, in patched
> patching.__exit__(*exc_info)
>
> File "/home/zuul/src/opendev.org/jjb/jenkins-job-builder/.tox/cover/lib/python3.6/site-packages/mock/mock.py", line 1545, in __exit__
> return exit_stack.__exit__(*exc_info)
>
> File "/usr/lib/python3.6/contextlib.py", line 339, in __exit__
> received_exc = exc_details[0] is not None
>
> IndexError: tuple index out of range
From now on, to avoid similar issues in the future, the 'mock' package
is only installed for Python 2.x.
Change-Id: Ib3044312f0770735d88d8657d1f953e5a33e771f
System groovy has difference with the simple groovy command. System
groovy result XML for system groovy command (script), looks like this:
<hudson.plugins.groovy.SystemGroovy plugin="groovy@2.3">
<source class="hudson.plugins.groovy.StringSystemScriptSource">
<script plugin="script-security@1.75">
<script>Groovy command</script>
<sandbox>[true|false]</sandbox>
<classpath>
<entry>
<url>...</url>
</entry>
...
<entry>
<url>...</url>
</entry>
</classpath>
</script>
</source>
<bindings>...</bindings>
</hudson.plugins.groovy.SystemGroovy>
Change-Id: I85eb5848de2a817ab132559b53cbeb316931195f
Nr of retries options added to Notifications plugin
in commit ee22c8b released in notification-1.12 July 2017.
Change-Id: I3271dfd68cd8d28024af952cda7500d438a2676e
The join-trigger documentation still uses the deprecated
"even-if-unstable" field in its examples.
Update the "join-trigger001.yaml" fixture referenced by the
documentation to use the "threshold" configuration instead.
Add a new fixture to retain coverage for "even-if-unstable".
Change-Id: Ic8b28b384e0a6d7e43833d2db9524a41e4508ba7
Add support for custom messages per build result in the Slack
notification plugin.
Change-Id: Iafc8b67528914c6d14c78f72aa535a3cfa7f7033
Story: 2007912
Task: 40315
This patch adds the following options that are missing from JJB
but available in the UI:
- fail if path not found
- skip ssl verification
- k/v engine version
Change-Id: Id8e14d63c668a1ef826ae88ae3ce0360609bde99
Following parameters have been implemented in JJB:
- Active Choices Parameter
- Active Choices Reactive Reference Parameter
Test cases also have been written.
Change-Id: I6e953aa26114fde9ff293ed17cc17d5972df9af3
Signed-off-by: Eren ATAS <eatas.contractor@libertyglobal.com>
Added the missing tags, also added a test case.
Change-Id: Ic1cb6c3991afe7ef99dd448e6ba49d510f54bd59
Signed-off-by: Eren ATAS <eatas.contractor@libertyglobal.com>
On version 1.17 of BuildTimeoutWrapper plugin, new option
called "AbortAndRestart" has been introduced. The plugin support
has been updated in order to support this option. A test case
also added.
Change-Id: I4bcbdbc45e177fc4d302baa68898e89463535f6f
Signed-off-by: Eren ATAS <eatas.contractor@libertyglobal.com>
Parameters inside triggers were not updated while the upper
parameters were changed, were staying as default. Updated
the implementation to make it take from the upper level.
Change-Id: I16fc3525fcdf0a8bf3aea3b8422f0f2ad26f9e24
Signed-off-by: Eren ATAS <eatas.contractor@libertyglobal.com>
The tag provides Jinja templating capabilities for generating parts of
YAML structures. Two potential use cases are provided as test cases and
are linked in the documentation.
The new tag should also help address some use cases people were asking
about, like here:
https://groups.google.com/g/jenkins-job-builder/c/HkVZVuBDlKM.
Change-Id: I96392e42c3c79a9be0a8f736506908701251dd62
Added also a test case for version specific changes
Change-Id: I5213dccffc441037c63ee7c042aee4a8a84d9732
Signed-off-by: Eren ATAS <eatas.contractor@libertyglobal.com>
Resolves flake8 BLK related issues.
"BLK100 Black would make changes."
"BLK999 Unexpected exception: ..."
Change-Id: Ic6d4265e3d02b2f2a15ab851eaed98288c62730c
Signed-off-by: Thanh Ha <zxiiro@gmail.com>
Updated test cases as well, The tag has been introduced after 2.35.2
therefore the parameter is also >=2.35.2
Change-Id: Ie0801108a16969b420b341e2deaa6ba62deb116c
Signed-off-by: Eren ATAS <eatas.contractor@libertyglobal.com>
Up until now <inheritanceStrategy> tag was only added to jobs-in-a-folder
and folder configs. In JJB the tag's class is always set to
"InheritParentStrategy" which according to the docs means the "item will
inherit its parent items permissions". Apparently <inheritanceStrategy>
tag needs to be present on top-level jobs also. For top-level jobs
setting the tag's class value to "InheritParentStrategy" means the job
"will inherit the global security security settings" and this is the
default behavior.
The code has simplified a bit - if it's a folder then we use a different
property name for authorization matrix property, other than that the
code is the same for all three "variants": folder, job-in-a-folder and
job-outside-a-folder (top-level job).
Also this change fixes the missing <inheritanceStrategy> tag for
job-in-a-folder, where the folder name was specified as part of the
"name" key instead of the standalone "folder" key. With this change we
no longer check if a job is in a folder or not, so it's implicitly
fixed. Added a test case to catch potential regressions in the future.
The copyright notice reflects this and the previous contribution in this
module.
Change-Id: I84b22c09c8a107aab2b4eca20feffc9b61675a92
In the current implementation, jjb creates an empty
combinationFilter tag whenever there is `executionStrategy`.
This empty tag should not appear.
Change-Id: I2bf25ae58d12904ce0a00e0a5cfefbf27d9451ad
Signed-off-by: Eren ATAS <eatas.contractor@libertyglobal.com>
Implemented the following tags that have been missing:
- displayBuildErrorsOnDownstreamBuilds
- blackListCommitAuthor
- GhprbCommentFile
- GhprbNoCommitStatus
Following tags are printed when the value of the key is empty:
- whiteListTargetBranches
- blackListTargetBranches
- buildDescTemplate
- triggeredStatus
- startedStatus
- statusUrl
- addTestResults
Also updated tests
Change-Id: I1e19841d88728af9ac6aa9e1c78f89fe962a583f
Signed-off-by: Eren ATAS <eatas.contractor@libertyglobal.com>