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

builder

Gets the build step managed by this condition

condition

Gets the object describing the conditions for this build step

static get_jenkins_plugin_name()[source]

Gets 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

Return type

str

classmethod instantiate(condition, builder)[source]

Factory method for creating a new conditional build step

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

  • condition (ConditionalBuilderCondition) – 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

Returns

newly created conditional build step

Return type

ConditionalBuilder

pyjen.plugins.conditionalbuilder.PluginClass

alias of pyjen.plugins.conditionalbuilder.ConditionalBuilder