Pytest makes each scenario into individual selectable test.
To be able to run each scenario separately is very useful for development.
Change-Id: I4b1c990a1fd839ce327cd7faa27159a9b9632fed
removes first letter capitalization from the valid time periods, e.g.:
- Second -> second;
- Minute -> minute;
- Hour -> hour;
- and so on...
- only lowercase time periods are recognized by Jenkins Branch API Plugin:
- that can be observed on the plugin implementations themselves:
- https://github.com/jenkinsci/branch-api-plugin/search?q=Minute
- on the Message.properties file it can be verified that the
value of the "Minute" property is actually "minute", and that
can also be validated pratically, setting the durationName
XML to "Minute" is not effective, Jenkins effectively
interprets it as default "Hour" since "Minute" is not valid.
Change-Id: I25f0a3945b9d708fa2de5c5fdb7f39a9432b5cc3
Since version 2.5.3 the branch-api plugin allows users to specify Minute
and Second as the time period for rate limiting.
Task: 42803
Signed-off-by: Bracken Dawson <abdawson@gmail.com>
Change-Id: Id3558d818e2927ecc3d775870ad1929f0fda2e6f
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
Please review the following patch containing the code changes in
the repo. This patch is a transition patch and is the auto-generated
output of the python-black tool.
Change-Id: I2d2de71da8a105fb62b561899ae78441ddab4032
Signed-off-by: Thanh Ha <zxiiro@gmail.com>
In the process of taking advantage of 'convert_mapping_to_xml()',
commit:7ebe78979166e36a038a116788c33383878ced20 renamed 'block-level' to
'blocking-level' in the build-blocker property.
Another unrelated commit modified the test to use 'block_level' instead
of 'block-level'.
Change-Id: I2dd642ec4966c4c48e0a35e986a69b3b74803358
Signed-off-by: Trevor Bramwell <tbramwell@linuxfoundation.org>
The groovy-plugin has introduced with it's 2.0 release on April 10th 2017
the notion of SecureGroovyScript with the associated sandbox for groovy code
To enable JJB jobs relying on the sandbox groovy execution we need to enable
the expected SecureGroovyScript XML stanza.
When used with the groovy 2.0 plugin this will
enable the following JJB YAML stanza
properties:
- inject:
groovy-content: test groovy-content location 004
groovy-sandbox: true
Needed for groovy code sandbox mode
This implementation is the same as the wrapper implementation in
jenkins_jobs/modules/wrappers.py L949- L989
Change-Id: I93e890a7a0496520246532adbdfd84e3be746abf
Preparatory move for adopting pre-commit hooks.
Shoudl only remove newlines and spaces at end of files.
Change-Id: Ia33679467c533722b9308f7e7b74be395c926428
Signed-off-by: Sorin Sbarnea <ssbarnea@redhat.com>
In [version 2.0](8f2ae302bd)
of the priority sorter plugin, the long name of the plugin was renamed
to "Jenkins Priority Sorter Plugin", which broke the `priority_sorter`
function in the `properties` module.
The short name did not change, so we now use that instead to ensure
that we generate a configuration that matches the latest required by
the plugin.
Change-Id: I89a8fdabeac63ea482b3b1bd8ddf2dd83c1c7435
Task: 3112
Story: 2000655
Refactor base test class inheritance to allow for BaseTest class to be
reused without needing to also import the TestCase class everywhere in
order to avoid having the common test function executed on base classes.
This makes it easier to build base testing classes and then simplifies
the subclassing of these for actual tests.
Change-Id: I89809e8082469f814f245db4a9ab7658aac8a405
- Rename test file to be more descriptive
- Add minimal test file
- Add plugin="rebuild" attribute
- Add plugin desciption to doc
Change-Id: I466d8fed4c4167b9693ae3bb369611ef4b63e318
Signed-off-by: Kien Ha <kienha9922@gmail.com>
- Rename test file to be more descriptive
- Add full test file
- Add plugin="github" attribute
- Update plugin to use convert xml
Change-Id: I579248edbab73bda8a5ab8afc11805ac61e049b4
Signed-off-by: Kien Ha <kienha9922@gmail.com>
- Add plugin="delivery-pipeline-plugin" attribute
- Rename test files to be more descriptive
Change-Id: I9db5315e425da6bd5c69b533c79d6d5ab4ed1e70
Signed-off-by: Kien Ha <kienha9922@gmail.com>
The copyartifacts property on Jenkins requires that the config XML
provide an string element for each allowed project. On JJB the
documentation says that the projects needed only to be comma-separated,
however JJB is not doing the job separation.
Parsing the projects string, spliting it by commas and then adding it to
a different string element solves this.
Change-Id: I59d8b2c070f28df4cfa9da0ab58f2c57e4243384
Signed-off-by: Lucas Dutra Nunes <ldnunes@ossystems.com.br>