| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Warnings appear when running local_yaml unit tests.
This commit fixes the issues causing these warnings
```
ResourceWarning: unclosed file <_io.TextIOWrapper
name='jenkins-job-builder/tests/yamlparser/fixtures/include_path001.conf'
mode='r' encoding='utf-8'>
jjb_config = JJBConfig(self.conf_filename)
```
Change-Id: I8fec288cce8c9f6c7b928886d7c70f7a35d43b4a
|
|
|
|
|
|
| |
Remove code refering to old plugin config format.
Change-Id: Iba0922d3bfe066444e5e982c303968d15e1853a1
|
|
|
|
| |
Change-Id: Ieb7f80f25d7fe640caede8d8aef76950ca498723
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add options --jobs-only and --views-only to job_builder
section in config file.
By default JJB updates both jobs and views. Some cases
non-admin users are not allowed to update views on Jenkins
which requires explicity using -j flag.
Allow users to set a config option 'update=jobs|views|all'
in the 'job_builder' section implicitly use --jobs-only or
--views-only and control these flags from the config file.
Note: CLI options takes precedence over the config file.
Change-Id: I2a94e5a2d671ccbfc505de2f19b578ecfef9e9d7
Co-Authored-By: Thanh Ha <zxiiro@linux.com>
Signed-off-by: Anil Belur <askb23@gmail.com>
Signed-off-by: Thanh Ha <zxiiro@linux.com>
Signed-off-by: Anil Belur <askb23@gmail.com>
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
If set to True, YAML anchors can be referenced across files, allowing jobs to be
composed from bits of YAML defined in separate files. False by default.
Story: 2000338
Task: 2547
Change-Id: I034ce3bce0030093cb8d4266dabbdb06d96306d6
|
|/
|
|
|
|
|
|
|
|
| |
At the moment, if you don't know that you have configuration for the
given plugin in your config file, there's nothing that actually suggests
that's where you should start looking to fix this.
Change-Id: I32481eb9b1a4feafc8b8ca2cec63e4b9a0b29441
Story: 2001735
Task: 12090
|
|
|
|
|
|
|
|
| |
Add print_job_urls = True to [job_builder] to enable output as urls
instead of simple job names when changing them.
Change-Id: I3454606a50ca385c87d8c13d3eab5d30d94cf02f
Signed-off-by: Sorin Sbarnea <ssbarnea@redhat.com>
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| | |
Avoids occasional test executions failures
caused by leftover files on dev machine or
by preexisting configuration files.
Change-Id: Ia0ba29e2dda58c37410a6926cae3039e4ba3473e
|
|/
|
|
|
|
|
|
|
|
| |
Introduced by a7af4a4c100916f77456a8dabbc92a3f935bde62
config.validate() expects the presence of builder['plugins_info'].
Its value can either be null or a list.
Change-Id: Idc9f0be7b25cc254f2aea958d5c3bc8b3ccaac89
Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
|
|
|
|
|
|
|
|
|
| |
Remove unnecessary class members that are not used or queried after
object initialization.
Remove temporary assignment no longer needed.
Change-Id: Iab2cd2a69fae103967bb20cf2ede4884f4bf67d6
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Use a simple object to ensure matching against any default value is
possible to distinguish been not being set by a user versus use of
a negative default value passed.
This prevents triggering an incorrect notification to the user when
the code is querying for plugin options that could override the
default behaviour and the compatibility code attempts to look up an non
existing section. It would fail to distinguish between no section
present and current value to return matching the default value
suggested.
Change-Id: I5597c2628ccb5a4282a97a4ce5d3bbe41bd9eebb
|
|/
|
|
|
|
|
|
|
|
| |
Based on current documentation:
If no configuration files are found (either in the default paths or
given through the command-line), jenkins-jobs will skip querying for
plugin information
Change-Id: Ic83dfc89eb07013054a5582a8a44e787605db735
Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Migrate from a global config __future__ to control behaviour to plugin
specific options to decide on whether to take the param order from yaml
when using the trigger-parameterized-builds plugin or when plugins are
making use of it as well.
Adjust the config retrieval to support a default value to simplify
logic around ensuring the behaviour matches 'true' by default.
Remove some redundant logic in helper module handling a default value
lookup and add some additional conf files to continue having some tests
using the old behaviour.
Remove old conf files setting the __futures__.param_order_from_yaml to
true as this is now the default under the correct plugin setting.
Change-Id: Ibd5f549b6d626bacaaa4221015a70aaf03626b00
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Remove the old default hipchat configuration style in favour of
using the new plugin style and provide a mechanism to copy the url
value from the jenkins section automatically as part of a simple
migration.
This will allow removal of querying the jenkins section from existing
module code and allow for better isolation.
Change-Id: I6889777904ebabc01c044abcd31c9d8a20c255c4
|
|/
|
|
|
|
|
| |
Allows user to specify which section from ini config
should be used for loading Jenkins server details.
Change-Id: I57633662e3ca2dba48af8db9e08fb8d5f8bc3bfa
|
|
|
|
|
| |
Change-Id: Icc5b28c4636b542a10502b7b1d2d2dc2028cc166
Signed-off-by: Sorin Sbarnea <ssbarnea@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Plugins can use get_plugin_config() which will search in a plugin
namespace. For example:
[plugin "hipchat"]
authtoken = 123token
- Updated hipchat plugin to use get_plugin_config()
- Updated stash plugin to use get_plugin_config()
- Backwards compatibility is kept by falling back to the old
configuration setting if the new one is not found.
- Warning is displayed if the old configuration method is used.
Change-Id: I7cff063e2d179a5d9a3f221c85de6864382bc477
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
|
|
|
|
| |
Change-Id: Ic0c1be9ca037b67695136583837702d3ec4d42a8
|
|
|
|
| |
Change-Id: Iec16a5965d62bebb50d3e7307ab93c59304a9ab6
|
|
|
|
|
|
|
|
| |
This corrects the issue where a config file in a standard location is
not used if --conf <file> is not passed on the command line.
Change-Id: I4a17d342f2751359381658a545441465d4a42a9b
Signed-off-by: Philip Marc Schwartz <philip@progmad.com>
|
|\ |
|
| |
| |
| |
| | |
Change-Id: I20d8874f1c663639a806b6e1b7ff2ef1839313de
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Make sure that flush cache is correct set first by config file, and
additionally that the CLI overrides any defaults.
In the V2 API work, when moving code around the flush cache option was
accidentally removed from being set by the command line or config
files. This ensures it follows the same behaviour as other similar
options.
Change-Id: I9fb1e234e5ed081ada64855389a87d2f7555469e
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit sees JJBConfig start to take the form it ought to have,
namely using attributes to represent different logical sections of
configuration that target specific subsystems of JJB.
It also moves ConfigParser data retrieval from
jenkins_jobs.modules.helpers.get_value_from_yaml_or_config_file() to
jenkins_jobs.config.JJBConfig.get_module_config()
TODO: Add JJBConfig tests to validate the behavior of JJBConfig in
specific circumstances.
Change-Id: I053d165559f5325a2f40b239117a86e6d0f3ef37
|
|
|
|
|
|
|
|
|
|
|
|
| |
Ensure that argparser object only makes use of the JJBConfig object
instead of leaking a command line parser into a config object for API
usage.
Take care to use 'None' as default for store_true/store_false options
in order to ensure that the config file defaults are only overridden
when CLI options are explicitly set.
Change-Id: I4066ad750f9893759c2e9bdfde425fafacc7e672
|
|
* Create jenkins_jobs.config module with JJBConfig class.
* Move DEFAULT_CONF from jenkins_jobs.cmd into jenkins_jobs.config
* Move configuration initialization into JJBConfig
* Create method, "do_magical_things" to handle arbitration between
config file and arguments as well as setting default values for
config file settings if it doesn't contain the expected keys.
* Move JenkinsJobs.create_parser into its own module,
jenkins_jobs.cli.parser, it can be used to provide default settings
in the JJBConfig class when an argparse namespace object is not
provided; this is primarily necessary because most of the original
configuration initialization code relies on this being a namespace
object (simple descendant of the object class).
At this point JJBConfig isn't much more than an object-oriented
version of the way configuration handling happened previously. Its
current form, however, is more amenable to the ultimate goal of the
2.0 refactorings--namely, being able to pass a single config object
around rather than breaking it up into apparently arbitrary settings
necessary to instantiate the Builder class and its delegate objects.
Change-Id: Ic0147e1dccbe620aaaba039a434e7cea6c670054
|