pyjen.plugins.flexiblepublish module

Primitives for operating on job publishers of type ‘Flexible Publisher’

class pyjen.plugins.flexiblepublish.ConditionalAction(node)[source]

Bases: pyjen.utils.xml_plugin.XMLPlugin

conditional action associated with a flexible publisher

Contains 1 or more publishers to be run if a certain set of conditions is met.

Parameters

node (xml.etree.ElementTree.Element) – XML node with the decoded XML data associated with a plugin

classmethod instantiate(condition, actions)[source]

Factory method for creating a new instances of this class

Parameters
  • condition (XMLPlugin) – Flexible publish build condition pre-configured to control this publish operation

  • actions (list of XMLPlugin) – List of 1 or more “build stage” plugins that you would like to use in the publish phase of a Jenkins job

Returns

reference to the newly instantiated object

Return type

ConditionalAction

property publishers

publishers to run should the conditions associated with this action are met

Type

list (XMLPlugin)

class pyjen.plugins.flexiblepublish.FlexiblePublisher(node)[source]

Bases: pyjen.utils.xml_plugin.XMLPlugin

Job plugin enabling conditional execution of post-build steps

https://plugins.jenkins.io/flexible-publish

Parameters

node (xml.etree.ElementTree.Element) – XML node with the decoded XML data associated with a plugin

property actions

list of conditional actions associated with this publisher

Type

list (ConditionalAction)

static get_jenkins_plugin_name()[source]

str: the name of the Jenkins plugin associated with this PyJen plugin

This static method is used by the PyJen plugin API to associate this class with a specific Jenkins plugin, as it is encoded in the config.xml

classmethod instantiate(actions)[source]

Factory method for creating a new instances of this class

Parameters

actions (list of ConditionalAction) – list of conditional actions to perform under this publisher

Returns

reference to the newly instantiated object

Return type

FlexiblePublisher

pyjen.plugins.flexiblepublish.PluginClass

alias of pyjen.plugins.flexiblepublish.FlexiblePublisher