def pre_scm_buildstep(parser, xml_parent, data): """yaml: pre-scm-buildstep Execute a Build Step before running the SCM Requires the Jenkins `pre-scm-buildstep. <https://wiki.jenkins-ci.org/display/JENKINS/pre-scm-buildstep>`_ :arg list buildsteps: List of build steps to execute :Buildstep: Any acceptable builder, as seen in the example Example:: wrappers: - pre-scm-buildstep: - shell: | #!/bin/bash echo "Doing somethiung cool" - shell: | #!/bin/zsh echo "Doing somethin cool with zsh" - ant: "target1 target2" ant-name: "Standard Ant" - inject: properties-file: example.prop properties-content: EXAMPLE=foo-bar """ bsp = XML.SubElement(xml_parent, 'org.jenkinsci.plugins.preSCMbuildstep.' 'PreSCMBuildStepsWrapper') bs = XML.SubElement(bsp, 'buildSteps') for step in data: for edited_node in create_builders(parser, step): bs.append(edited_node)
def pre_scm_buildstep(parser, xml_parent, data): """yaml: pre-scm-buildstep Execute a Build Step before running the SCM Requires the Jenkins `pre-scm-buildstep. <https://wiki.jenkins-ci.org/display/JENKINS/pre-scm-buildstep>`_ :arg list buildsteps: List of build steps to execute :Buildstep: Any acceptable builder, as seen in the example Example:: wrappers: - pre-scm-buildstep: - shell: | #!/bin/bash echo "Doing somethiung cool" - shell: | #!/bin/zsh echo "Doing somethin cool with zsh" - ant: "target1 target2" ant-name: "Standard Ant" - inject: properties-file: example.prop properties-content: EXAMPLE=foo-bar """ bsp = XML.SubElement( xml_parent, 'org.jenkinsci.plugins.preSCMbuildstep.' 'PreSCMBuildStepsWrapper') bs = XML.SubElement(bsp, 'buildSteps') for step in data: for edited_node in create_builders(parser, step): bs.append(edited_node)