Commit Graph

695 Commits

Author SHA1 Message Date
Kienan Stewart 804fcf903e Update TAP publisher plugin
Add support for the following configuration options:

 - stripSingleParents
 - flattentTapResult
 - skipIfBuildNotOk
 - removeYamlIfCorrupted

Signed-off-by: Kienan Stewart <kstewart@efficios.com>
Change-Id: I387e5cd46fadb54e478627346dc6b4223bda1fc0
2024-01-24 11:15:24 -05:00
Vsevolod Fedorov 67645a46eb Fix legacy plugin version comparison; Remove cap on setuptools version
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
2023-12-19 12:10:43 +03:00
Zuul 5aeecef649 Merge "Update documentation links" 2023-11-23 10:19:08 +00:00
Vsevolod Fedorov a1d4f91d1a Add context for macro calls
Change-Id: I674b153770297c3a0abbfcee26d840e0f2be490b
2023-11-22 12:58:37 +03:00
Vsevolod Fedorov 53bdf1ee7a Update documentation links
Apply URL redirections reported by tox docs-linkcheck output.

Change-Id: Id2f400414068c26d3103ca8fa564b7e9827f9f79
2023-11-09 12:24:34 +03:00
Ettore Leandro Tognoli d839dc7699 Add discord-notifier publisher
Plugin page: https://plugins.jenkins.io/discord-notifier/
Requested on: https://github.com/ettoreleandrotognoli/jjb-discord/issues/1

Change-Id: If34f0dec29af661d62f6b7b7110297fd1751ab8e
2023-03-29 17:27:25 -03:00
Piotr Falkowski 927bb1919b Support for follow-symlinks in archive publisher
Change-Id: I1d5bd1c6ef5ccdf5f304dabf3a9afcb59d2b2baf
2023-01-16 22:06:49 +01:00
Eric Ball 930dd24dd2
Fix: Update sphinx version pin, fix warnings
Sphinx was pinned to >1.5.0 <=1.7.0 4 years ago. It is now on v4.4.0,
and we're seeing an incompatibility with the latest version of jinja2.

Along with updating the Sphinx version, this also includes fixes for
several warnings generated in the latest version:
  * Outdated docs due to the removal of the "parser" param from
    Base.get_xml
  * Class lookup issues
  * External links for which we have extlinks defined
  * Deprated PyModulelevel is replaced by PyFunction
  * sphinx.ext.autodoc.Documenter.get_doc signature changed

Signed-off-by: Eric Ball <eball@linuxfoundation.org>
Change-Id: Iba65fb724f098f3e4a0b20f2a183cb2ea3c450ea
2022-03-31 15:44:40 -07:00
Zhang Xiaoxu 013c1a0835 Add support git publisher rebase before push
This change adds support for git publisher rebase before push. [0]

[0] https://plugins.jenkins.io/git/

Signed-off-by: Zhang Xiaoxu <zhangxiaoxu5@huawei.com>
Change-Id: I3cb0eecbbee6c51433cb4e3b856a3165462f49d1
2022-01-28 11:57:41 +08:00
Pat Long d352ed9656 Fix documentation links
Jenkins Wiki has been fully taken off line, so update the remaining
links to reference either the relevant plugin page or the github repo.

Add extlink target for repo in jenkinsci github org.

The sonatype-clm plugin seems to be more-or-less completely deprecated,
so update the description to indicate this and link to the
nexus-artifact-uploader plugin.

Update the jjb sphinx plugin so that it generates references for the
yamlfunctions.

Change-Id: If2241e751d01a60a8cb4cbaea5b3176aeb92eab4
Signed-off-by: Pat Long <pllong@arista.com>
2021-09-09 18:34:40 -04:00
Matthieu Baerts 0f6944d15b
junit: add jenkins-plugin link
Like for the other plugins.

Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
Change-Id: Ide752d697be9024b954734b7c4ad371400bb4e1d
2021-08-31 18:18:48 +02:00
Matthieu Baerts deafd08377
junit: add 'Skip marking build as unstable on test failure' param
This new option has been added in JUnit v1.51

  https://github.com/jenkinsci/junit-plugin/releases/tag/junit-1.51

The user can decide not to mark a build as unstable on test failure.

Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
Change-Id: I960ed98cf4b0f8f632546492f6dbb6d1aa0055c9
2021-08-31 18:18:48 +02:00
Matthieu Baerts 93ae6dd1e4
junit: add 'Skip publishing checks' param
This new option has been added in JUnit v1.39

  https://github.com/jenkinsci/junit-plugin/releases/tag/junit-1.39

The user can decide not to publish issues to SCM provider platforms.

Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
Change-Id: I543dbd5cb355acc5106336afd8953a03245df2fa
2021-08-31 18:18:48 +02:00
Matthieu Baerts 1d6e580ff3
xunit: support versions 3+
A new major version (3.0.0) of XUnit plugin has been released in January
2021:

  https://github.com/jenkinsci/xunit-plugin/releases/

I didn't have an issue when I upgraded the plugin from version 2.4.0 to
3.0.0. But I started to have this error at the end of a build and I
guess it appeared only after having modified the configuration of the
Jenkins jobs with JJB:

  ERROR: Build step failed with exception
  java.lang.IllegalArgumentException: The tools section is required.
	at org.jenkinsci.plugins.xunit.XUnitProcessor.<init>(XUnitProcessor.java:139)
	at org.jenkinsci.plugins.xunit.XUnitPublisher.perform(XUnitPublisher.java:204)
	at jenkins.tasks.SimpleBuildStep.perform(SimpleBuildStep.java:123)
	at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:80)
	at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
	at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:803)
	at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:752)
	at hudson.model.Build$BuildExecution.post2(Build.java:177)
	at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:697)
	at hudson.model.Run.execute(Run.java:1932)
	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
	at hudson.model.ResourceController.execute(ResourceController.java:97)
	at hudson.model.Executor.run(Executor.java:429)
  Build step 'Publish xUnit test result report' marked build as failure

When looking at the configuration of the job from the Web UI, the XUnit
plugin was enabled but left "unconfigured": no file to look at.

Apparently, JJB is sending a XML config that is not understood by XUnit
plugin anymore. I guess I didn't have any issue before updating the
Jenkins jobs with JJB because when upgrading XUnit plugin from 2.4.0 to
3.0.0, Jenkins migrated the config to the new format.

From what I see when analysing the generated XML from JJB and the one
from Jenkins after having configured a job manually, a sub-element has
been renamed, from 'types' to 'tools'. I suspect this is caused by this
commit:

  https://github.com/jenkinsci/xunit-plugin/commit/aa47ac57d

(XUnitBuilder class had this line: @XStreamAlias("types"))

So here, I simply picked 'tools' or 'types' for the sub-element and
depending on the plugin's version in both the builder and the publisher
parts. I'm only using the publisher but I guess the problem is the same
with the builder.

Tests have been adapted to verify both versions <3.0.0 and >=3.0.0.

Change-Id: Ie78539d0ae25ddc139ad9982cdffd2e683dd40b2
Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
2021-03-17 16:21:33 +01:00
Thanh Ha 09613c84f7
Remove broken plugin.jenkins.io links
Some deprecated plugins appear to have been removed from the Jenkins
plugin page, remove broken links but link to their GitHub pages for
history.

Change-Id: I59e41b5c783fa49d86cac87721969d79cab17f5c
Signed-off-by: Thanh Ha <zxiiro@gmail.com>
2020-11-13 09:52:02 -05:00
Alexandre Erwin Ittner 8ed66b00a2 Slack: support custom messages per build result
Add support for custom messages per build result in the Slack
notification plugin.

Change-Id: Iafc8b67528914c6d14c78f72aa535a3cfa7f7033
Story: 2007912
Task: 40315
2020-10-15 20:15:04 -03:00
Eren ATAS 2a5acc24d6 Updated Email Extended Publisher Plugin
Parameters inside triggers were not updated while the upper
parameters were changed, were staying as default. Updated
the implementation to make it take from the upper level.

Change-Id: I16fc3525fcdf0a8bf3aea3b8422f0f2ad26f9e24
Signed-off-by: Eren ATAS <eatas.contractor@libertyglobal.com>
2020-09-18 11:59:43 +02:00
Zuul 3a05654787 Merge "Updated ext-email support" 2020-09-16 16:22:23 +00:00
Eren ATAS a24a547de0 Updated ext-email support
Added also a test case for version specific changes

Change-Id: I5213dccffc441037c63ee7c042aee4a8a84d9732
Signed-off-by: Eren ATAS <eatas.contractor@libertyglobal.com>
2020-09-02 15:37:16 +02:00
Thanh Ha 5a98ebb8bb
Fix flake8 BLK100 and BLK999 issues
Resolves flake8 BLK related issues.

"BLK100 Black would make changes."
"BLK999 Unexpected exception: ..."

Change-Id: Ic6d4265e3d02b2f2a15ab851eaed98288c62730c
Signed-off-by: Thanh Ha <zxiiro@gmail.com>
2020-08-31 10:54:19 -04:00
Eren ATAS 15ee9899b8 Added property-multiline for parameterized build trigger plugin
Updated test cases as well, The tag has been introduced after 2.35.2
therefore the parameter is also >=2.35.2

Change-Id: Ie0801108a16969b420b341e2deaa6ba62deb116c
Signed-off-by: Eren ATAS <eatas.contractor@libertyglobal.com>
2020-07-31 14:12:00 +02:00
David Aguilar a580a6240c publishers: add "threshold" support to join-trigger
The joinTrigger plugin now accepts a resultThreshold field instead
of the evenIfDownstreamUnstable boolean.  Add support for a "threshold"
yaml field to manage this value.

Change-Id: I60ba999b963709a76854a4d50387d2b1eefae05f
Signed-off-by: David Aguilar <davvid@gmail.com>
2020-06-23 23:35:05 -07:00
David Aguilar bc585293b2 publishers: deprecate "evenIfDownstreamUnstable" in join-trigger
Only emit the joinTrigger evenIfDownstreamUnstable property when
it has been configured.  This property is no longer presented
in newer version of the join plugin, and has been replaced with
a result threshold.  Mark the boolean as deprecated.

Change-Id: If87517330ebbef17146b20f47689a29f8417b20e
Signed-off-by: David Aguilar <davvid@gmail.com>
2020-06-23 23:35:05 -07:00
David Aguilar 52caa12068 publishers: refactor out a helpers.trigger_threshold() helper
Change-Id: Ic698dc7a5f0952e5a7a4fef3350959b3d4f72d45
Signed-off-by: David Aguilar <davvid@gmail.com>
2020-06-23 23:35:05 -07:00
Adam Romanek 8625fe2a97 Pipelines: stop producing unsupported and deprecated XML tags
The changes include:
- <concurrentBuild> should now be represented as
  <org.jenkinsci.plugins.workflow.job.properties.DisableConcurrentBuildsJobProperty/>
  property
- <triggers> should now be localed inside
  <org.jenkinsci.plugins.workflow.job.properties.PipelineTriggersJobProperty>
  property, in <properties> section
- unsupported XML elements got removed:
  - <blockBuildWhenDownstreamBuilding>
  - <blockBuildWhenUpstreamBuilding>
  - <assignedNode>
  - <canRoam>
  - <customWorkspace>
- got rid of publishers from project_pipeline_template005.{xml,yaml} as
  these are not supported in Pipeline jobs

The above changes align the produced XMLs with the ones from Jenkins 2.190.1
and Pipeline plugin v2.6.

Task: 39836
Story: 2007708

Change-Id: I650ef2ee60e872cce8f93de5f391933d68ec81f0
2020-05-25 13:59:13 +02:00
Christian Kanthak dc36dca479 Add "upstream-committers" to publisher "email-ext"
Add support for the recipient item "Upstream Committers" of the
"Send To" list of a trigger of the "Email Extension" (email-ext)
plugin.

Change-Id: Iaa77330bb1910881df154494b0472ce21ea28d99
Task: 39595
Story: 2007607
2020-05-04 17:42:14 +02:00
Artem Nikitin 9cff4f295e Add execute-on parameter for post build steps
executeOn setting is available for PostBuildStep
since 2.0 version of the Post Build Script plugin.
For previous plugin's version executeOn should be
set on the PostBuildScript layer.

Change-Id: I6b7c9ccfbd0a2d610499074675835e6b5d96cb17
Task: 39028
Story: 2007411
2020-03-12 17:04:46 +00:00
Zuul e273b68325 Merge "conditional-publisher: sort publisher attributes alphabetically" 2020-03-04 02:16:25 +00:00
Zuul a3dc53b381 Merge "Ignore py:obj warnings and fail on warnings" 2020-02-07 16:17:45 +00:00
Ken Dreyer 4096dbdd1b conditional-publisher: sort publisher attributes alphabetically
As described in dc83d5161f, Python 3.8's
ElementTree now writes out attributes in insertion order. On older
Python versions, ElementTree writes attributes in alphabetical order
instead.

The conditional_publisher() method takes an existing publisher XML
node and alters it by changing the tag name to "publisher" and adding a
new "class" attribute with the original tag name. ElementTree on py38
preserves the insertion order of the "class" attribute, whereas py37 and
earlier would have sorted "class" ahead of the other attributes.

This leads to a unit test failure on Python 3.8 in
publishers/fixtures/conditional-publisher002.yaml. The conditional
"copy-to-master" publisher has a "plugin" attribute in the XML. On py37,
the "class" attribute sorted before the "plugin" attribute
alphabetically, but on py38+, "plugin" was inserted before "class", so
the order is effectively reversed.

To resolve the test failure, sort the attributes alphabetically when we
modify edited_node. This makes py38 write the edited_node attributes in
the same order as older Pythons. With this change, the test suite passes
when comparing the JJB output with the static XML fixture file.

Change-Id: Ib727365e101507d9ab69a426bb0bda89a402fb08
2020-02-06 09:45:40 -07:00
Mattia Rizzolo d69208c0c4
Fix some typos in documentation
Change-Id: I67d82228bb37b8b4634c07e76a421964e227c3cb
Signed-off-by: Mattia Rizzolo <mattia@mapreri.org>
2020-02-03 23:46:57 +01:00
Thanh Ha c3ef26c1b0
Ignore py:obj warnings and fail on warnings
* Enables fail on warnings and enable nitpicky
* Consolidate string -> str for args

Change-Id: Id5c29d48813fd6f772816dc74c7c4e408097113d
Signed-off-by: Thanh Ha <zxiiro@gmail.com>
2020-01-22 20:43:52 -05:00
Thanh Ha 29b8795753
Update Jenkins wiki -> plugins URLs
The Jenkins Wiki page is deprecated and Jenkins community is expected
to migrate their documentation to plugins.jenkins.io URL. This patch
updates all plugins that have a relevant plugins.jenkins.io URL
documentation link.

Change-Id: Iba7df7eada7b8ca0bb9aad93f5499ac6365a9293
Signed-off-by: Thanh Ha <zxiiro@gmail.com>
2020-01-22 19:47:02 -05:00
Thanh Ha ee706cbdf1
Update Jenkins wiki -> plugins URLs
The Jenkins Wiki page is deprecated and Jenkins community is expected
to migrate their documentation to plugins.jenkins.io URL. This patch
updates all publishers that have a relevant plugins.jenkins.io URL
documentation link.

Change-Id: I94448d04f2b28fbf3befde2e49c76d196e352d7e
Signed-off-by: Thanh Ha <zxiiro@gmail.com>
2020-01-22 13:13:26 -05:00
John Oram f760f090fc
Add support for opsgenie notification plugin
Change-Id: Id84b3d9282568cf47d5feb930fd618afe969b45f
2020-01-07 12:41:26 -05:00
Thanh Ha 7b00932d2c
Enable docs-linkcheck
This toxenv will allow us to flag URLs that no longer work. We
also switch from using old style setup.py build_sphinx to the
newer sphinx-build command.

Change-Id: I62f42918814fb6eea4876e0d22c6bccddf86a826
Signed-off-by: Thanh Ha <zxiiro@gmail.com>
2020-01-06 09:50:13 -05:00
Andreas Jaeger 55d54f69bc Update homepage
Since change I5cbf7b5cfea349a0bd72d2abee40710175cf5b2f, this repo
publishes to https://jenkins-job-builder.readthedocs.io/en/latest/ ,
let's update the links for this.

Change-Id: I08f8dd992ee1b6360f3d226cb668cda7f4242b8a
2019-12-22 17:44:46 +01:00
Christoph Berg 6e835286f1 text-finder: support not-built-if-found
Added upstream June 2018 in https://github.com/jenkinsci/text-finder-plugin/pull/16

Released upstream with 1.11 in June 2019: https://wiki.jenkins.io/display/JENKINS/Text-finder+Plugin

Change-Id: I28cf1425da98091ae0b19f450aea3fa5de6546c6
2019-10-10 14:50:59 +02:00
Sylvain Baubeau 84c114c088 Add support for new 'notify every failure' option in Slack Plugin
Change-Id: Idd48c5c0e595195aaecfee9aab7233cbf1d1a640
2019-10-04 13:01:10 +02: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
Zuul ead185134d Merge "Add support for two new plugins, and a new version of one" 2019-08-15 19:00:57 +00:00
Sergii Kipot 38aa498df3 Add support of "disableDeferredWipeout" option to workspace cleanup plugin
Change-Id: I2edd0343966e1720161c291b811b989f005495fb
2019-08-14 20:50:06 +02:00
kendallpcdoctor 5117d87e8c Add support for two new plugins, and a new version of one
Added new support for the following plugins:
Perforce plugin: https://wiki.jenkins.io/display/JENKINS/Perforce+Plugin
InfluxDB plugin: https://wiki.jenkins.io/display/JENKINS/InfluxDB+Plugin

Added support for v3.0 of the following plugin
https://wiki.jenkins.io/display/JENKINS/Priority+Sorter+Plugin

Change-Id: If109863a91710c08b34dee622496e551a7b3b520
2019-07-25 13:12:49 -07:00
Johann David dfbcbb2510 Add support for 'Micro Focus Application Automation Tools'
Change-Id: Ie514614889daeccbd15b5b2cfffc6157c272849e
2019-06-06 22:54:44 -04:00
Patrick Paul ddc5ee77b1 Include support for jacoco source inclusion pattern
Change-Id: Iec75f7041e38bda09abf4d85abc15219259eff2c
2019-05-06 18:01:09 -07:00
Zuul 9462a710f1 Merge "Add 'publishers-from' to the publishers module" 2019-04-10 01:13:17 +00:00
Norbert Grünwald 062b759ee9
Add 'publishers-from' to the publishers module
This adds the 'publishers-from' action to the publishers module.
It enables the "Use publishers from another project" provided by
the "Template Project Plugin".

Change-Id: I6fb030a99bccaa79e4f99efe012ff63c6d376a38
2019-04-09 09:34:19 +08:00
Areum Cho 55de214675
Add support for Packer plugin
Change-Id: Idcb85f53656efb07a6aafe28f60ecafd9011fab4
Co-Authored-By: Tan Heng Yeow <E0032242@u.nus.edu>
Signed-off-by: Tan Heng Yeow <E0032242@u.nus.edu>
2019-04-09 09:24:20 +08:00
Kyr Shatskyy b67c0bc754 Add support for 'RocketChat Notifier Plugin'
Change-Id: I78755fb1d116a6e164817589457fe132b81a89eb
Signed-off-by: Kyr Shatskyy <kyrylo.shatskyy@gmail.com>
2019-03-04 20:54:58 +00:00
Daniel Watkins c59b5a5258 Fix new flake8 failures
Change-Id: Ieb7f80f25d7fe640caede8d8aef76950ca498723
2019-01-30 11:40:50 -05:00