2450 Commits

Author SHA1 Message Date
Jerome Hourquebie
8bcd0d0bd2
Add cloudbees folder creation support
Add project folder module. Jenkins folder could be made with project-type: folder
This requires Cloudbees folder plugin and python-jenkins folder update
(see: https://review.openstack.org/#/c/180185/)

Change-Id: I7e1c28c26a69ae6ca736cec88fcb957a716d8fad
2017-10-23 13:34:56 -04:00
Zuul
3bb56f745e Merge "Update build_keeper to use convert_mapping_to_xml()" 2017-10-23 17:31:35 +00:00
Zuul
16a307188e Merge "Add support for the Branch API Plugin" 2017-10-23 17:28:33 +00:00
Zuul
6445c6c3a1 Merge "Update extended_choice_param to use convert_xml()" 2017-10-23 17:24:35 +00:00
Zuul
09f979a97f Merge "Add support for jira_comment_trigger" 2017-10-23 17:11:45 +00:00
Zuul
ffa96cca7b Merge "Add support for jira_issue_updater" 2017-10-23 17:11:44 +00:00
Zuul
d4a4d55553 Merge "Switch param order from yaml conf to plugin specific" 2017-10-20 14:23:30 +00:00
Jenkins
229134923d Merge "Give an explicit error message when unsupported view type used" 2017-10-10 07:53:02 +00:00
Jenkins
d0c0e108c2 Merge "Add default columns to list views" 2017-10-07 16:24:17 +00:00
Daniel Watkins
0cbcf2c710 Update tox.ini to run voting tests by default
When a developer runs `tox`, they should see the results which will be
voting in gerrit.

Change-Id: I4964b674a1317f454739ef69505c985dc323f845
2017-10-06 14:27:04 -04:00
Daniel Watkins
e6d6c276d1 Give an explicit error message when unsupported view type used
When specifying a view type that isn't supported by any modules (such as
"list-view" instead of "list"), this ensures that the user is guided
towards something correct.

This changes the error message in this case from:

AttributeError: 'NoneType' object has no attribute 'name'

to:

jenkins_jobs.errors.JenkinsJobsException: Unrecognized view type: list-view (supported types are: list, pipeline)

Change-Id: I0ee800db1c9c8aeecffcf11f1e86c03ba0590da8
2017-10-06 14:24:48 -04:00
Daniel Watkins
83592a094b Add default columns to list views
This uses the default "All" view columns as the columns for any views
without a columns attribute sets.  This means that view definitions
which don't define any columns will still end up producing a useful
view.

(Note that the "All" columns are not fetched from the Jenkins instance;
the columns that are the default in a fresh Jenkins install are
hard-coded.)

Change-Id: I0a21e024be383088c6238c3fc7beb708af8c2c46
2017-10-06 14:22:59 -04:00
Jenkins
41c54bba00 Merge "Add support for unstable return parameter for shell builders" 2017-10-06 15:12:29 +00:00
Jenkins
bfa1ae56eb Merge "Add Support for a list of additional-credentials in the SVN-plugin" 2017-10-06 15:07:50 +00:00
Jacqueline Haefke
88e4dfdc2c Add Support for a list of additional-credentials in the SVN-plugin
Since the 30.01.2017 the SVN plugin support additional-credentials, but the jenkins-job-builder can't generate this part:

<additionalCredentials>
     <hudson.scm.SubversionSCM_-AdditionalCredentials>
        <realm>...</realm>
        <credentialsId>...</credentialsId>
     </hudson.scm.SubversionSCM_-AdditionalCredentials>
     <hudson.scm.SubversionSCM_-AdditionalCredentials>
        <realm>...</realm>
        <credentialsId>...</credentialsId>
     </hudson.scm.SubversionSCM_-AdditionalCredentials>
</additionalCredentials>

Now you have optional 'additional-credentials' parameters.

Change-Id: I801cada4bd630242a216a1facc4abfc8d5378bcf
Task:4884
Story:2001152
2017-10-06 10:08:32 +02:00
Daniel Watkins
ba913ea800 Add support for unstable return parameter for shell builders
This continues to support the current string form for job configuration,
as well as adding a form that supports a mapping.  This mapping has two
keys: "command", containing the command to be executed (i.e. the current
string parameter); and "unstable-return", containing the exit code that
configures the exit code that should cause a build to be marked
unstable.

Change-Id: I43ecc883236bbf8fc6de7ed8992e6d90da7d48ac
2017-10-05 14:58:27 -04:00
Jenkins
5be08a5be6 Merge "Allow update to provide plugin_info via yaml" 2017-09-26 15:16:32 +00:00
Jenkins
eff67d90f7 Merge "change assert(Not)Equals to assert(Not)Equal" 2017-09-26 14:47:58 +00:00
Darragh Bailey
d62fcc8ca4 Switch param order from yaml conf to plugin specific
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
2017-09-22 16:34:16 +01:00
Jenkins
51832b1881 Merge "Document JJB 2.0 plugin config default behaviour" 2017-09-20 00:43:26 +00:00
Jenkins
bfc0f6faf1 Merge "Default gitlab to newest plugin config format" 2017-09-20 00:43:15 +00:00
Jenkins
7b1a71d882 Merge "Default artifactory-generic to newest plugin config format" 2017-09-20 00:43:09 +00:00
Jenkins
9e342cc5bd Merge "Default cmake config to newest plugin format" 2017-09-20 00:43:02 +00:00
Jenkins
333fde2da8 Merge "Default groovy-postbuild to newest plugin format" 2017-09-20 00:41:26 +00:00
Jenkins
646c61bb34 Merge "Default slack to newest plugin config format" 2017-09-20 00:40:51 +00:00
Jenkins
ea583ffe93 Merge "Default conditional-publisher to newest plugin format" 2017-09-20 00:40:10 +00:00
Thanh Ha
2974f1e636
Allow update to provide plugin_info via yaml
Getting plugin info requires Administrator permissions. It seems the
test command allows providing the plugin_info details via a yaml
configuration file. This patch allows the same command to be passed to
the update command to allow us to configure the plugin versions manually
and not require administrator permissions.

Additionally this patch adds a new command called get-plugins-info
which can create the plugins_info.yaml file to pass to the
plugin_info_path.

See:
http://lists.openstack.org/pipermail/openstack-infra/2016-June/004388.html

Change-Id: I5a34979407d863a84f34afbf8f565081ec52190a
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
2017-09-19 18:17:15 -04:00
zhangyangyang
8744b5b1a5 change assert(Not)Equals to assert(Not)Equal
According to http://docs.python.org/2/library/unittest.html
assert(Not)Equals is a deprecated alias of assert(Not)Equal.

Change-Id: Ibadf2b2c6cb09db6f5cc191240aad2ac8cb4ea33
Closes-Bug: #1329757
2017-09-13 17:24:13 +08:00
Jenkins
b58f6b17de Merge "Move macro expansion into YamlParser." 2017-09-08 15:41:08 +00:00
Thanh Ha
db05e4041d
Default conditional-publisher to newest plugin format
Change-Id: I09497fdb6b4906c82d33d9b7b67d79beb110628a
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
2017-09-08 10:12:19 -04:00
Thanh Ha
ab0b27385d
Default slack to newest plugin config format
Change-Id: I2685190d08cf8f7b02ffbe5c1b26ec1d3ed40074
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
2017-09-08 10:11:00 -04:00
Thanh Ha
eed6249098
Default groovy-postbuild to newest plugin format
Change-Id: I82747a5579c081b524363aa97281ae6d65d8c21d
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
2017-09-08 10:08:43 -04:00
Jenkins
f2b01f7c5c Merge "Update openstack to use convert_mapping_to_xml()" 2017-08-29 22:10:05 +00:00
Jenkins
6a7140f9a5 Merge "Update plot plugin" 2017-08-29 21:45:59 +00:00
Jenkins
1ae2a83a84 Merge "Update archive to use convert_mapping_to_xml()" 2017-08-29 21:11:42 +00:00
Jenkins
f2beeb1a8a Merge "Updating slack publisher parameters" 2017-08-29 20:58:07 +00:00
Yolande Amate
024db19793 Add support for jira_issue_updater
Change-Id: I7ca54752e12540ef2de2d8d888da5e79ee4345e5
2017-08-28 23:17:53 +01:00
Jenkins
74e020052e Merge "Migrate hipchat conf to new plugin style conf" 2017-08-24 15:19:39 +00:00
Wayne Warren
e645ac2acf
Move macro expansion into YamlParser.
Introduce the registry.MacroRegistry class to handle:
 * registration of macro types via setuptools' entrypoints
 * registration of individual macros for lookup by component list type
 * expansion of macros references during YAML "parsing"

As a consequence there is a reduction in performance due to moving the
expansion of macros from inline with XML generation, to requiring
multiple passes over macro component lists.

This decrease in efficiency results in approx ~30-50% increase in unit
test time. Since this will allow for jobs to be expanded from
templates/macros in parallel with future changes, it is a reasonable
short term trade-off as the most computationally expensive task is
updating the definitions on the remote master

Change-Id: I292c6b1f8472370282205426cd8ceb847eb969bd
2017-08-24 10:14:26 -04:00
Darragh Bailey
906781a752 Migrate hipchat conf to new plugin style conf
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
2017-08-23 18:31:44 +01:00
Yolande Amate
c8b360cb47 Update archive to use convert_mapping_to_xml()
Change-Id: Iaeabaeaa093335b57367b71d93bb17356bc59662
2017-08-21 23:31:22 +01:00
Yolande Amate
828baa7d3e Update openstack to use convert_mapping_to_xml()
Change-Id: I29fdc553512f19c73aef88c42d72f8b5c3d9f003
2017-08-21 19:27:09 +01:00
Yolande Amate
c8f6f97d88 Add support for jira_comment_trigger
Change-Id: I7df9e26527e2fdbeb134cdcb4c288c3ef36e341b
2017-08-21 16:34:40 +01:00
Yolande Amate
3e44a52336 Add support for the Branch API Plugin
Change-Id: I3ed06a4ef957cb088bda8b9a5881d642f68cbe3d
2017-08-16 02:34:31 +01:00
Yolande Amate
c4f56f961b Update build_keeper to use convert_mapping_to_xml()
Change-Id: I2cd89c84b308013b16915834af9c037d856fe026
2017-08-12 00:19:41 +01:00
Yolande Amate
5541b319bc Update cvs to use convert_mapping_to_xml()
Change-Id: I0fb5426865f0b116491ece745442f7d2fa8d290b
2017-08-11 22:31:13 +01:00
Thanh Ha
ecdb180c8d
Document JJB 2.0 plugin config default behaviour
Document the behaviour change in JJB 2.0 to default configuration to the
latest supported version. These series of changes were modified via the
topic:2.0-config-format in Gerrit.

https://review.openstack.org/#/q/status:open+project:openstack-infra/jenkins-job-builder+branch:master+topic:2.0-config-format

Change-Id: I96160bd63c39a1346f1eefd24eda475cfb30caf3
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
2017-08-11 13:39:58 -04:00
Jenkins
b402d7800c Merge "Add !include-jinja2 for rendering templates with Jinja2" 2017-08-10 11:08:53 +00:00
Sorin Sbarnea
6a9d5736d6 use alphanum sorting for jobs and views
This improves UX by using a alphanum sorting which
is more natural to humans: [a1, a2, a10] instead of
[a1, a10, a2].

Change-Id: Ice9c3de282f08e85c8f8a34a27d1b6c0502ca9cb
Signed-off-by: Sorin Sbarnea <ssbarnea@redhat.com>
2017-08-09 17:51:00 +01:00
Daniel Watkins
b95f194612 Add !include-jinja2 for rendering templates with Jinja2
This template included using !include-jinja2:

"""
{{ my_var }}
"""

is rendered the same as an existing template that looks like this:

"""
{my_var}
"""

This also allows the use of Jinja2's richer syntax:

"""
{% for test_environment in configuration.get("envs", ["py35"]) %}
tox -e {{ test_environment }}
{% endfor %}
"""

Story: 2001135

Change-Id: Ia3ee21822d6e9237f5ea46796bc8810ecac61e2c
2017-08-09 10:11:42 -04:00