Commit Graph

45 Commits

Author SHA1 Message Date
Vsevolod Fedorov 99c9c860c3 Move some parameter tests to proper directory
Change-Id: I5c7700f05492a5adc2507282169b19ec16186982
2023-11-21 11:59:14 +03:00
Vsevolod Fedorov f4d64f9f66 Move tests to pytest
Pytest makes each scenario into individual selectable test.
To be able to run each scenario separately is very useful for development.

Change-Id: I4b1c990a1fd839ce327cd7faa27159a9b9632fed
2022-12-20 10:44:43 +03:00
wangdonghui 50f7b49f64 Add support for Persistent Parameter
Change-Id: I947f85cb8ce85bf44b695fc45b8d56b4bee852a1
2022-02-14 16:08:53 +08:00
Igor Lakhtenkov 2e988b3f26 Added support of json type for extended choice parameter and related parameters.
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
2021-01-04 12:36:24 +03:00
Eren ATAS e4f2724a00 [ONEM-16360] Parameter Separator support
Tests are also added.

Change-Id: I509fd9689be7693f95f87a5f23c2fe5adf2f82d5
Signed-off-by: Eren ATAS <eatas.contractor@libertyglobal.com>
2020-09-25 14:55:43 +00:00
Igor Lakhtenkov 2eb74a15cd Added trim option for String parameter.
Task: #22637
Change-Id: Ic2722aac586d3911e3ff5ab4c2d3c5a7a03fa14e
2020-05-22 17:04:49 +03:00
Thanh Ha 4d90c187a9 Auto-generated output from python-black
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>
2019-09-09 19:23:24 +01:00
Gleb Samsonov fc7864ab7f
adding variable bindings option to extended parameters
Change-Id: I4e9fba2da7771d1cac04bcb9818389207a6f301e
2019-04-09 09:41:28 +08:00
Bernhard M. Wiedemann 405df97718 Use upstream default for allNodesMatchingLabel
As has been found earlier in Idf3460f165209611113193c7e85a884c42511371
having allNodesMatchingLabel on is a very bad idea
because it kills scaling in your CI
by scheduling every job on every node in parallel

Change-Id: Iae07b578ccfb6f728a1615628479318c46e0530a
2018-09-07 13:17:16 +02:00
Aigars Mahinovs 07a059d270 Allow running only on one of nodes with label parameter
Current default value setting makes the jobs with label parameter
execute in parallel on all nodes matching a label. In some cases that is
not expected and is undesirable. It is also no the default value
upstream

Change-Id: Idf3460f165209611113193c7e85a884c42511371
2018-08-21 10:06:51 +02:00
Sorin Sbarnea 4953756c27
adopt pre-commit hooks
Change-Id: I98bc0b5717c3921b35e74f53c55f896427880a84
Signed-off-by: Sorin Sbarnea <ssbarnea@redhat.com>
2018-07-12 13:40:38 +01:00
Sorin Sbarnea c2781e670f
Normalize newlines at end of file
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>
2018-06-29 16:07:06 -04:00
Zuul fab15b1238 Merge "Add groovy-script-file option to extended parameters" 2018-06-21 17:35:14 +00:00
tanhengyeow 3308fd53bb Improve support for nodelabelparameter
Adds support for all fields for nodelabelparameter. Uploaded new tests, including one that covers existing behavior to prevent regression.

Story: #2001287
Task: #5835

Change-Id: I9dc4574427626fd56ba41149f0f6ab131a22e966
2018-06-21 22:05:32 +08:00
Yaron de Leeuw ba94e2ad72 Add groovy-script-file option to extended parameters
The extended parameters plugin allows to specify where the groovy script
file is to generate parameter

Change-Id: I0c6ac0b49c24b8d3afbc06b003847de2e043c2b8
2018-05-24 12:55:08 -04:00
tanhengyeow f37444423b Improve support for Extended Choice Parameters
Adds support for extended choice parameters with regards to default groovy scripts.

Change-Id: I9d2a61013f041e7b81a80b5618781dbefeace329
Story: #2001931
Task: #14461
2018-05-22 17:23:21 +00:00
Darragh Bailey 13df88774a Add helper tag to join arbitrary lists into strings
Adds a yaml application tag '!join:' to support defining data as a list
while having the resulting contents automatically joined together with
the specified delimiter and passed as a string into the resulting object
returned by yaml for JJB to process.

This allows users to store long lists of data that is combined together
for use with Jenkins plugins that expect a delimited string of arguments
instead of needing each module in JJB to provide individual support.

Change-Id: I745181ade3926d5c29708963189ae499a0378ece
2018-04-12 20:36:44 +01:00
Thomas Meeus ab9d80cc79
Enable groovy-script includes for extended_choice_param
Change-Id: I3e0f4dec04d20b1603774a483b2776caa8504b9c
2017-12-06 15:30:16 +01:00
Zuul f668bbae49 Merge "Update svn-tag parameter to support all config" 2017-10-27 03:41:38 +00:00
mostwanted b972fc07ec
Add support for the Git Parameter Jenkins plugin
Change-Id: I7522f1250de88f073c0f47149dafed7fff9ecd9f
Resolves: #2000902, #2000802
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
2017-10-25 23:32:50 -04:00
Joost van der Griendt 208527640a
Update svn-tag parameter to support all config
Additionally update the plugin to use convert_mapping_to_xml and add
min/max tests.

Change-Id: I8f0a9054c12ea984a286aea1012513baac07479f
Co-Authored-By: Thanh Ha <thanh.ha@linuxfoundation.org>
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
2017-10-25 22:52:39 -04:00
Yolande Amate 00e2ea35d6 Update extended_choice_param to use convert_xml()
Change-Id: Ia713a21061d6d6db1d1ac48983a44f6f3ea1cc1d
2017-08-05 02:27:49 +01:00
Mike Dorman 1368205c0e Add support for credentials job parameter type
Adds support for the 'credentials' parameter type for job
definitions.  Requires the Jenkins Credentials Plugin.

Change-Id: I5e410668caed9e95bed7afb02341a456d2ece5e3
Story: 2000761
2017-01-03 14:56:05 -07:00
Jenkins 5b6730b220 Merge "Add support for the random string parameter" 2016-10-06 03:08:37 +00:00
Timothy R. Chavez 2e377ba3af Add support for the random string parameter
Change-Id: I4aa49e32e7c1628fb0bb7c587e0060d5b601dd35
2016-09-26 13:42:26 -05:00
Darragh Bailey 4573b3a25d Refactor base test classes inheritance for reuse
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
2016-09-14 14:58:57 +01:00
Joost van der Griendt d3413105c3 Adding support for Hidden parameter plugin
Change-Id: I853b12bc0b28211133cf9bb990e910df6541f4f7
2016-08-17 08:57:35 +02:00
Jenkins 044f1b46b3 Merge "Add Promoted Build parameter." 2016-04-23 23:25:02 +00:00
Jenkins 12614f13ab Merge "Add value description feature to extended choice parameter" 2016-04-23 15:02:35 +00:00
Joao Vale 3da732e01e Add Promoted Build parameter.
Change-Id: Ic995976a9c2596c8579963512e20a44087641dce
Co-Authored-By: Steven Armstrong <Steven.9.armstrong@gmail.com>
2016-04-22 20:40:33 +01:00
Nicolas Glayre bb6d4755a2 Adding support for maven-metadata-plugin
Added a method called maven_metadata_param to deal with maven metadata
(https://wiki.jenkins-ci.org/display/JENKINS/Maven+Metadata+Plugin)
plus addition of relevant tests

Change-Id: Id04b33653cc90f69dd1588286352b9d19e852ece
2016-01-21 16:46:16 +01:00
Darragh Bailey 8805a34c0f Reorder imports to match hacking guidelines
Ensure that the imports follow the standard OpenStack hacking
guidelines.

Change-Id: Iaa4326aef118ddfd807dd006934f1d9ca80a1cfa
2015-12-23 15:23:42 -08:00
Jenkins 3f0ff2dff6 Merge "Capture logs with FakeLogging Fixture" 2015-10-07 16:52:54 +00:00
Darragh Bailey 9bfbffa559 Capture logs with FakeLogging Fixture
Capture logs to attach them on exceptions to simplify the debugging of
errors in tests when they occur.

Change-Id: I5c1b5c306aba37789a8d41eabf65e0ac628af838
2015-09-30 16:25:22 +01:00
Darragh Bailey a7c0635271 Support copyartifact build selector param
Allow defining of a build selector build parameter to be used by the
copyartifact plugin.

Change-Id: Iac3a3812354c514936ba89ca04dbd7f9ad193073
2015-09-17 23:14:17 +01:00
Anyi Li 134364c3cc Add value description feature to extended choice parameter
Current version of Extended Choice Parameter jenkins plugin
has a feature which you could give descriptions to assign descriptions
to choice values. However current version of jenknis-job-builder does
 no support this feature. Add this feature into this commit. It will introduce
 three new xml nodes to the generated xml:
 <descriptionPropertyValue/>
   comma separated list of value descriptions
 <descriptionPropertyFile/>
   description property file
 <descriptionPropertyKey/>
   key in the description property file

Change-Id: Ie464a510edf01e21c7e96df2003f2c5f7fb15720
2015-07-30 08:25:28 -04:00
Sergey Kulanov 0547e44129 Allow multiple node selection for 'node' parameter
Change-Id: I6690e5fcfe5169e2fdb6815cfde95e607abb5c42
2015-01-16 21:57:08 +02:00
Andrey Pavlov b542685244 Add 'node' parameter to 'parameters'
This parameter defines a list of nodes where this job could potentially
be executed on. Nodes can be choosen from list of current available nodes.
Currently it trasforms to single-selection dropdown to choose a slave for execution.

Change-Id: I5379d20b94e3b33360ea8f842e3b4237b491addb
2014-12-14 10:32:39 +03:00
Jenkins 6a069e6468 Merge "Move extended-choice support to parameters module" 2014-12-03 23:29:47 +00:00
Clayton O'Neill 84fd7ecc75 Move extended-choice support to parameters module
This patch fixes support for the extended choice plugin in the
parameter module so that it can nicely coexist with the other
parameters.  This leaves the existing extended choice plugin code in the
properties module, but removes the documentation from that location and
adds a deprecation warning.  This patch also provides parity with the
existing functionality under the properties module.

Change-Id: Ibace4284fc1bd391948917979a4223bd3007dff4
Closes-Bug: #1361335
2014-11-17 14:44:08 -05:00
Barnaby Court f20aed7ba3 Add support for the matrix-combinations plugin
This plugin allows a user to choose which matrix combinations
they want to run, as opposed to the default behaviour where
jenkins runs all combinations

Requires the Jenkins Matrix Combinations Plugin:
https://wiki.jenkins-ci.org/display/JENKINS/Matrix+Combinations+Plugin

Change-Id: I13205c81aa11523a4c3fc373820eb74863d0c7ca
2014-11-13 09:17:57 -05:00
Tomas Bezdek e300d6926e Added support for Extended Choice Parameter plugin
https://wiki.jenkins-ci.org/display/JENKINS/Extended+Choice+Parameter+plugin
based on https://github.com/rozky/jenkins-job-builder

Change-Id: If179619da5e795a1649168e133ca25b5f9f7b187
2014-11-04 11:35:07 +00:00
Michael Tupitsyn 3ce78059c9 Add support for build parameter of type "Run"
Defines a run parameter for parametrized build, where users can pick a
single run of another project. The absolute url of this run will be
exposed as an environment variable.

Change-Id: I86bc3109b00259f9fe3dcf7ab9d72cb1f22fadc2
2014-10-12 07:37:52 -07:00
Kei YAMAZAKI 604d39305b Fix multibyte character problem
Fixed problem that causes a UnicodeEncodeError when use multi-byte characters in the job.yml.

Change-Id: Ie715c827a794e73fae11cdca079ea80cfb8c280d
2014-01-21 22:34:30 +09:00
Khai Do b790bbc681 update doc and add new JJB unit tests
Add documentation on how to generate documentation and run JJB unit tests.

Also added a unit tests for each category of plugins as examples for others
to follow when adding new JJB plugins.  I'm hoping this will help contributors
add tests for new plugins going forward.

Change-Id: I2ab90cdb37d0f3b1e947345d4291d2927b04a0c6
2013-11-22 17:51:17 +00:00