pyjen.plugins.conditionalbuilder module

Primitives for operating on Jenkins job builder of type ‘Conditional Builder’

class pyjen.plugins.conditionalbuilder.ConditionalBuilder(node)[source]

Bases: pyjen.utils.xml_plugin.XMLPlugin

Jenkins job builder plugin

capable of conditionally executing a build operation

https://wiki.jenkins-ci.org/display/JENKINS/Conditional+BuildStep+Plugin

Parameters

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

property builder

PyJen plugin describing the build step associated with this condition

Type

XMLPlugin

property condition

PyJen plugin describing the conditions for this build step

Type

XMLPlugin

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(condition, builder)[source]

Factory method for creating a new conditional build step

Parameters
  • condition (XMLPlugin) – Condition to be applied to the build step. The build step will only be executed if the terms defined by this condition evaluate to True

  • builder (XMLPlugin) – Nested job build step to be executed conditionally May be any PyJen plugin that defines / manages a Job build step

Returns

newly created conditional build step

Return type

ConditionalBuilder

pyjen.plugins.conditionalbuilder.PluginClass

alias of pyjen.plugins.conditionalbuilder.ConditionalBuilder