2543 Commits

Author SHA1 Message Date
Zuul
20afabf4b8 Merge "Preserve template-name via escaping" 2.0.2 2018-02-09 16:44:31 +00:00
Zuul
a601f54f2f Merge "Fix the formatter regex" 2018-02-09 16:44:28 +00:00
Thanh Ha
9593fd30e5
Add delay units to documentation
Change-Id: I33fcf9d9ea2b3858dcf5461be73ec4e8f1cc896e
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
2018-02-09 10:29:51 -05:00
Darragh Bailey
733906f01b Preserve template-name via escaping
Make use of an improved regex pattern matching to simply escape the
template name when passing into the params to allow the name be
preserved and used as input to other params.

This avoids needing to perform an additional branch test against all
variables being formatted.

Change-Id: I9c0ac8996d520b9acff3d29039c5c3d76f56d899
Depends-On: I8a74f9b4236ca7bcc72dd207fca23c2bf6a7c801
2018-02-09 14:59:41 +00:00
Zuul
ed07d8fa94 Merge "Fix timeout wrapper version detection" 2018-02-08 20:55:26 +00:00
Zuul
308aec601e Merge "hipchat_notif: Fix compatibility dispatch" 2018-02-08 04:08:00 +00:00
Zuul
0133a97b70 Merge "tests/base: Use plugins_info in SingleJobTestCase as well" 2018-02-08 04:07:46 +00:00
Zuul
84293edc20 Merge "tests/base: Drop "is not None"" 2018-02-08 04:05:34 +00:00
Zuul
c6b422ba18 Merge "Add support for ghprb wrappers" 2018-02-08 04:01:58 +00:00
Zuul
94319d248f Merge "gerrit-trigger: avoid exception spamming logs" 2018-02-07 15:20:33 +00:00
Zuul
80e9f3f10c Merge "Update credentials_binding to use convert_xml()" 2018-02-07 13:47:57 +00:00
Yolande Amate
804906565e Update credentials_binding to use convert_xml()
Change-Id: If891c8ad58287f81994788b4131c300bba7a42a9
2018-02-06 20:52:38 +00:00
Sorin Sbarnea
ea324d31d2 gerrit-trigger: avoid exception spamming logs
Adds empty triggerInformationAction section which when
missing was generating recurring spam on Jenkins logs.

included null not assignable to interface hudson.model.Action

See https://issues.jenkins-ci.org/browse/JENKINS-45788

Change-Id: I97efbfcb17388b5ca99901aa35f4311c8db77710
2018-02-06 12:16:35 +00:00
Tomas Janousek
cd651c4b80 hipchat_notif: Fix compatibility dispatch
This fixes the following error message that is produced when using the
old hipchat module in a real world scenario (as opposed to a synthetic
test):

    jenkins_jobs.errors.JenkinsJobsException: Unknown entry point or macro 'name' for component type: 'publisher'.

It works in the tests/hipchat/fixtures/hipchat005.yaml test because
the `data` dict contains only the 'hipchat' key, but when used in a
job-template, the dict contains a lot more, e.g. 'name', 'project-type',
'description' etc.

To make testing more difficult, `data` is not an OrderedDict, but dict
(see YamlParser._applyDefaults), so it behaves differently across python
versions, due to different order of dict.items (hash randomization, ...).
Therefore the test contains seemingly unnecessary fields like
'project-type', 'scm' and 'description'. Without these, it would pass
without the fix on at least one of py27, py35, py36, and it's rather
likely I haven't covered all possible scenarios (different platforms?).

Change-Id: Ie45084f1a4d6405d7e60dde5fce619a66dc026db
2018-02-01 11:43:51 +01:00
Tomas Janousek
f30179db4a tests/base: Use plugins_info in SingleJobTestCase as well
This is a preparation for the next commit which adds a testcase that
requires a plugins_info with newer version of hipchat plugin.

Change-Id: Ia8a7b226a375f407d4e0fb067737118efd0ab845
2018-02-01 11:43:51 +01:00
Tomas Janousek
fdd6180107 tests/base: Drop "is not None"
A harmless (in this particular case, where self.plugins_info_filename is
a string) refactoring.

Change-Id: I25a4b3c6b80d9c1e7ac358e655db70121add2d3c
2018-02-01 11:41:30 +01:00
Zuul
92fcbab123 Merge "docs: sphinx upgrade and warnings as erros" 2018-01-29 16:51:07 +00:00
Zuul
5da4f97e23 Merge "Allow template-name in the global defaults" 2018-01-27 07:56:58 +00:00
Sorin Sbarnea
d8ace6802d docs: sphinx upgrade and warnings as erros
Change-Id: I455ac0d79cca3883d3a758a2709c8c0255f4cc7d
2018-01-26 23:57:53 +00:00
Zuul
8d489abece Merge "Added option to print job names as urls" 2.0.1 2018-01-26 15:43:45 +00:00
Zuul
a0d75f00f9 Merge "Fix view definition documentation" 2018-01-26 15:34:24 +00:00
Zuul
693f7714cd Merge "Update _groovy_common_scriptSource to use convert_xml()" 2018-01-26 15:02:55 +00:00
Zuul
0cefc8a36d Merge "Update sauce_ondemand to use convert_xml()" 2018-01-26 14:45:17 +00:00
Sorin Sbarnea
b76ed1629d Added option to print job names as urls
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>
2018-01-26 14:14:07 +00:00
Zuul
92a828de6a Merge "Update artifactory_maven to make use of convert_mapping_to_xml()" 2018-01-26 13:57:46 +00:00
Zuul
05e1d8eea1 Merge "Improve test resiliency" 2018-01-20 15:31:49 +00:00
Sorin Sbarnea
c0b3b021dc Improve test resiliency
Avoids occasional test executions failures
caused by leftover files on dev machine or
by preexisting configuration files.

Change-Id: Ia0ba29e2dda58c37410a6926cae3039e4ba3473e
2018-01-18 18:08:56 +00:00
Thanh Ha
06bc48c0fd
Fix view definition documentation
View documentation was not properly being generated and linked
in the index. Let's add that in.

Change-Id: I6197dbecc89ddcf8c6f6b0e6a3d4c517224dc77b
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
2018-01-17 22:25:42 -05:00
Jan Hruban
30fe5dae98 Fix the formatter regex
Before:

{{var}} -> {var}, but the regex matches at the inner brace, but
re_replace returns the whole match (match.group(0) = "{var}") unchanged, passing
"{{var}}" to Formatter.

{{defined_var|def}} -> {{defined_var}}, because the regex matches at the
inner brace and re_replace returns "{%s}" % key ("{defined_var}"), passing just
"{{defined_var}}" to Formatter.

{{undefined_var|def}} -> exception, because the regex again matches at
the inner brace and re_replace returns default ("def"), passing "{def}"
to Formatter which then fails as def is not a defined variable (assuming
it isn't and allow_empty = False).

{{undefined_var|defined_var}} -> value of defined_var, same as above,
"{defined_var}" is passed to Formatter.

By preventing the regex from matching at inner braces, none of these
weird cases happen and even-braced strings are passed to Formatter
unmodified.

Change-Id: I8a74f9b4236ca7bcc72dd207fca23c2bf6a7c801
Co-Authored-By: Tomáš Janoušek <tomas.janousek@gooddata.com>
2018-01-16 16:08:41 +01:00
Jan Hruban
28cab53d5d Allow template-name in the global defaults
Inject the template-name into parameters earlier, so it's possible to
use it in the global defaults. Mark the template name as 'verbatim' so
the interpolation is skipped by the formatter.

Change-Id: I5d98e32ed2bedaa6b536e61fbdec589f358f861f
2018-01-16 16:00:46 +01:00
Jonathan Rajotte
8cb7d61dd9 Fix: initialize builder['plugins_info'] to None
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>
2018-01-16 00:35:12 -05:00
Yolande Amate
0139115699
Update artifactory_maven to make use of convert_mapping_to_xml()
Change-Id: I607f95c692dcf7a86ac6b9d49796d5907fdfcb2b
2018-01-15 08:53:52 -05:00
Sorin Sbarnea
705051658f bump python-jenkins version
Bumps python-jenkins version to avoid few
remarkable issues fixed in it:
- allow to wait for jenkins to enter normal operation
- remove cap on pbr version
- more py3 enablement
- other, see its changelog

Change-Id: I508b412bc2d17561e7a7ceef015ea018615596ad
2018-01-12 18:18:58 +00:00
Darragh Bailey
a7af4a4c10
Tidy up config object
Remove unnecessary class members that are not used or queried after
object initialization.

Remove temporary assignment no longer needed.

Change-Id: Iab2cd2a69fae103967bb20cf2ede4884f4bf67d6
2.0.0
2018-01-12 11:49:17 -05:00
Zuul
58a02d58f7 Merge "Prevent deprecation warning using test with stdin" 2018-01-12 14:56:10 +00:00
Zuul
1854fde4d9 Merge "No warn on old plugin conf format not in use" 2018-01-12 14:56:05 +00:00
Thomas Bechtold
ecf3933dc2 Fix timeout wrapper version detection
If, for whatever reason, the version of the build-timeout
plugin can not be detected, assume that we use a newer version (>= 1.14).
Version 1.14 is already ~ 2 1/2 years old so this is a sane assumption.
Also adjust fixtures to use the newer plugin version xml output.

Change-Id: I86295933d0c3247f55d0114473fc9c8f8feb7441
Signed-off-by: Bertrand Roussel <broussel@sierrawireless.com>
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
2018-01-09 09:02:29 -08:00
Jeremy Stanley
0b5ed0345a Generate universal wheels
JJB supports both Python 2 and 3 without any need to convert the
source, so we can safely publish universal wheels.

Change-Id: I59fdc6271ac662bf04fb84ba32b6bca6fe5e8624
2018-01-05 20:05:51 +00:00
Zuul
7199399163 Merge "Add tests for inner macro expansion." 2018-01-05 15:48:58 +00:00
Zuul
6d79c49609 Merge "Revert "Move macro expansion into YamlParser."" 2018-01-05 15:48:57 +00:00
Zuul
f5559560cc Merge "Fix: use False for default value of query_plugins_info" 2018-01-02 18:19:19 +00:00
Jonathan Rajotte
30d61a21e8 Fix: use False for default value of query_plugins_info
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>
2018-01-02 16:39:25 +00:00
Sorin Sbarnea
1a4246623b
Change file inclusion level from info to debug
File inclusion is debug info, info level would
spam console and make user unable to get
progress info without it.

File inclusion can easily mean >100 lines for
users relying on templating.

Change-Id: I013d86d8563fd75f5255578c0c735c4f2d5c074b
2018-01-01 15:59:24 -05:00
Wayne Warren
c1da0b15fb Add tests for inner macro expansion.
Change-Id: I535f3f0627c0948b951074977e15be04920790cd
2018-01-01 10:54:13 -06:00
Thanh Ha
eddb40babd Revert "Move macro expansion into YamlParser."
This reverts commit e645ac2acff34c7e58af2b4715b5bcdd2dffa31a.

Change-Id: I56e8c8282669cbc9f963056f64e9caef8104b6bb
2018-01-01 10:54:10 -06:00
Zuul
e3e8d161f3 Merge "Add messages and categories ignores to warnings publisher" 2017-12-28 15:34:22 +00:00
Zuul
685aba502a Merge "Add support for stash-pullrequest-builder plugin" 2017-12-27 16:22:53 +00:00
Zuul
8fc0ae0716 Merge "fixed depricated typo" 2017-12-27 16:13:34 +00:00
Zuul
5ad846c353 Merge "Add enhanced-logging for trigger-remote" 2017-12-27 16:00:38 +00:00
Zuul
f558c2ba30 Merge "Update conditional_step to use convert_xml()" 2017-12-18 15:57:20 +00:00