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
The Jenkins Wiki page is deprecated and Jenkins community is expected
to migrate their documentation to plugins.jenkins.io URL. This patch
updates links that have a relevant plugins.jenkins.io URL
documentation link.
Change-Id: I7ce6978d48d09deea976e9b5f800632e92e7bd11
Signed-off-by: Thanh Ha <zxiiro@gmail.com>
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>
This commit change the '(default: ...)' docstrings to '(default ...)',
also change 'Default' to 'default', to make docstring consistent.
Change-Id: Ib7957000013b0664f40eb74efad6f1c7359675fa
Enable testing of project modules to receive plugin info and ensure
that versions of the Maven project plugin older than 2.0.1 continue to
receive the required XML setting.
Change-Id: I2669052d0ef31c0b766e9cde24c842136c172b6c
In the maven-plugin, its usage is deprecated since version
2.0.1 and later (back in october 2013), causing errors on
/administrativeMonitor/OldData/manage webpage.
Before deprecation, default value was already true. To support
the plugin before it was deprecated the best would be to have
it parametrizable
Change-Id: Ic049e961983e9d5b25c5a2b0d32be5b3f717e923
Some remaining full URL usage has slipped in, convert these to use the
jenkins-wiki role extension for consistency through documentation.
Change-Id: I128c4838e846a3354a3e2961c244d5d45c2ee868
In CFP plugin version >=2.10.0 the JJB code completely breaks for Maven
settings due to the new support for freeform cfp id names. We can detect
a old style name simply by reading the starting of the name and setting
it to set settings_type=cfp to maintain support for the old versions of
this plugin. Otherwise the default settings_type will fall back to 'file'.
Users using cfp will now need to set 'settings-type: cfp' in their YAML
files if they need to pull in CFP settings. All other settings file
configuration will work as it did in the past.
Change-Id: I650d485de6ecc1d2ef8fad6580c0c315fadde168
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
Adding the ability to configure the following checkboxes -
* Incremental build - only build changed modules
* Disable automatic site documentation artifact archiving
* Disable automatic fingerprinting of consumed and produced artifacts
* Build modules in parallel
* Resolve Dependencies during Pom parsing
* Run Headless
* Process plugins during pom parsing
* Use custom workspace
Change-Id: Ie379e8812175a5b2dcb68546520994e9ce04d66a
ConfigFileProvider configuration is the same but is used in a few
places. This patch consolidates the configuration into a common reusable
function.
Change-Id: Idb45e43ff5a9dd6cea84e37026f875f98dc04c83
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
This patch adds some detection logic to the code to detect if the
settings file starts with:
org.jenkinsci.plugins.configfiles.maven.MavenSettingsConfig
or in the case of global-settings starts with:
org.jenkinsci.plugins.configfiles.maven.GlobalMavenSettingsConfig
If true, the module will configure for Config File Provider as the
settings files.
See:
https://wiki.jenkins-ci.org/display/JENKINS/Config+File+Provider+Plugin
Change-Id: Iecadfd6265100720d1d0b08d3cf57a510999f89d
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
Allow custom settings & global-settings config files to be configured
for maven projects.
In addition, the previously defined empty nodes for these configurations
were misnamed and this corrects that as well.
This change also switches to using an included test as an example.
Change-Id: I9f832f498e358268b3896ead3a78462e408bdd9d
Signed-off-by: Andrew Grimberg <grimbeaj@gmail.com>
The values map to these GUI choices
* default -> Default
* local-to-executor -> Local to the executor
* local-to-workspace -> Local to the workspace
This is on the project level what the similar option is on the builder
level.
Change-Id: I90ee3385ee12a46b5ab1eb26e3af1bdbfc36946a
Defining a project (in yaml) without setting any other parameters should
generate a basic jenkins job (in xml). While this works for freestyle jobs,
jjb will throw an error for maven and flow projects. The behavior should be
consistent across all types of projects. This patch just makes it so
that the behavior is consistent.
Change-Id: If7b749dae7631e8714a9416dfbd82d2443c0302c
For an optional boolean option, a common idiom was to write:
data.get('option-name', 'false')
Using a keyword False instead of the string 'false' (resp. True
instead of 'true') is deemed clearer, since it conveys that the
option is a flag.
Such calls are modified to using False/True. The change has been
creating using `git grep '.\(false\|true\).)'` to find what needed
to change.
Change-Id: I54087b5487c7186fcc4ee70ea9b28c1a1002a547
By default, Maven projects are configured to automatically
archive maven artifacts.
This commit exposes an option to configure that behavior in
a backward compatible way. By default, automatic archiving
is active, which means writing false in the XML configuration,
since the element name is "archivingDisabled".
Change-Id: I35e8a035a53356d7c171735aa5a52c6c429d1608
Reviewed-on: https://review.openstack.org/33367
Reviewed-by: Antoine Musso <hashar@free.fr>
Reviewed-by: Clark Boylan <clark.boylan@gmail.com>
Reviewed-by: Jeremy Stanley <fungi@yuggoth.org>
Approved: James E. Blair <corvus@inaugust.com>
Reviewed-by: James E. Blair <corvus@inaugust.com>
Tested-by: Jenkins
The maven build phase offers us a way to pass additional parameters to
the JVM. The option is shown as MAVEN_OPTS and accept a string which is
then expanded as mavenOpts.
Change-Id: I0a2437e8bda1e828c09e87343f7ca5025b77182c
Reviewed-on: https://review.openstack.org/32965
Reviewed-by: Arnaud Fabre <fabre.arnaud@gmail.com>
Reviewed-by: Mathieu Gagné <mgagne@iweb.com>
Reviewed-by: Khai Do <zaro0508@gmail.com>
Reviewed-by: James E. Blair <corvus@inaugust.com>
Approved: Clark Boylan <clark.boylan@gmail.com>
Reviewed-by: Clark Boylan <clark.boylan@gmail.com>
Tested-by: Jenkins
When ignore-upstream-changes is set to false, it will configure
the job to build whenever a SNAPSHOT dependency is built.
This setting is only available to Maven projects.
The default value is still 'true' for backward compatibility.
Change-Id: Ibdcdeef6264a68b9002a5b5bb35b90233db67e8a
Reviewed-on: https://review.openstack.org/32298
Reviewed-by: Clark Boylan <clark.boylan@gmail.com>
Approved: James E. Blair <corvus@inaugust.com>
Reviewed-by: James E. Blair <corvus@inaugust.com>
Tested-by: Jenkins
The generated markup contains a node "root_module", which is not
recognized by Jenkins:
WARNING: Skipping a non-existent field root_module
com.thoughtworks.xstream.converters.reflection.MissingFieldException: No
field 'root_module' found in class 'hudson.maven.MavenModuleSet'
The correct spelling is rootModule.
Change-Id: I0cae2c3358f2664783c97e245b064453a05bc988
Reviewed-on: https://review.openstack.org/26052
Reviewed-by: James E. Blair <corvus@inaugust.com>
Approved: Clark Boylan <clark.boylan@gmail.com>
Reviewed-by: Clark Boylan <clark.boylan@gmail.com>
Tested-by: Jenkins
Previously maven jobs did not specify a maven name so which maven
install Jenkins treated as default was used for all JJB maven jobs. Add
the ability to set a maven install explicitly so that multiple maven
installs may be used.
Change-Id: I6a26635c31c5504b855063e1d4f6fa53132f26b5
Reviewed-on: https://review.openstack.org/19756
Reviewed-by: James E. Blair <corvus@inaugust.com>
Approved: James E. Blair <corvus@inaugust.com>
Tested-by: Jenkins
Move test.sh to the tools directory.
Move parameters and notifications to their own modules; even
though they are implemented as Jenkins properties, they make
more sense as separate entities in the job builder, because
that's they way they are specified in the YAML. All three
modules that touch the properties xml object know how to
create it if it's missing.
Change-Id: I4b42ff10a93fd3ed98f632b58e47f3e0e45086d6
Reviewed-on: https://review.openstack.org/12741
Reviewed-by: Clark Boylan <clark.boylan@gmail.com>
Approved: James E. Blair <corvus@inaugust.com>
Tested-by: Jenkins
Change-Id: I4d6312e92dffd596ae58e55c837e3db3ea7d1c52
Reviewed-on: https://review.openstack.org/11198
Reviewed-by: Monty Taylor <mordred@inaugust.com>
Approved: James E. Blair <corvus@inaugust.com>
Tested-by: Jenkins
Change-Id: If19cb26fa544b485acfc188baf3506eaea61d6cf
Reviewed-on: https://review.openstack.org/11154
Reviewed-by: Monty Taylor <mordred@inaugust.com>
Approved: James E. Blair <corvus@inaugust.com>
Tested-by: Jenkins
Switch to using entry points for loading modules as well as
individual buliders, triggers, publishers, etc.
Remove most openstack-specific python code.
Change templating so it's less repetitive -- a single project
definition will suffice for multiple jobs or job-groups.
This outputs XML that is identical to the current production XML,
warts and all. There are significant improvements that can be made
to the YAML in a separate change, as they will cause minor changes
to existing jobs (adding timestamps, logrotate, etc.). These are
mostly marked with TODO in this change.
Change-Id: Idcfddb3b43b6cfef4b20919a84540706d7a0a0b1
Reviewed-on: https://review.openstack.org/11000
Approved: James E. Blair <corvus@inaugust.com>
Reviewed-by: James E. Blair <corvus@inaugust.com>
Tested-by: Jenkins