Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-12483

Make Python Plugin work with Conditional BuildStep Plugin

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Major Major
    • python-plugin
    • Jenkins v1.448, Windows 2008 R2 server hosting Jenkins, Windows, Mac and Linux slaves.

      The Python Plugin is very useful for encoding logic or operations into a build where a simple shell won't help. It would be nice if the Python Plugin would also work with Conditional BuildStep plugin so that the Python scripts could be conditionally executed. According to this web page (https://wiki.jenkins-ci.org/display/JENKINS/Conditional+BuildStep+Plugin), the problem is because the Python Plugin "does not provide a @DataBoundConstructor constructor and/or the Descriptor does not extend hudson.tasks.BuildStepDescriptor."

          [JENKINS-12483] Make Python Plugin work with Conditional BuildStep Plugin

          I see that this issue is still unresolved. It would be nice to see this fixed at some point.

          As a workaround though I decided to install the ShiningPanda plugin which does seem to work with the Conditional Build Step plugin and thus allows you to still run Python scripts conditionally in a job. This plugin does seem to offer more features than the Python Plugin at the expense of a slightly more complex configuration, so users may still like to use the latter in certain simple cases, so it would still be good to get this bug fixed.

          Kevin Phillips added a comment - I see that this issue is still unresolved. It would be nice to see this fixed at some point. As a workaround though I decided to install the ShiningPanda plugin which does seem to work with the Conditional Build Step plugin and thus allows you to still run Python scripts conditionally in a job. This plugin does seem to offer more features than the Python Plugin at the expense of a slightly more complex configuration, so users may still like to use the latter in certain simple cases, so it would still be good to get this bug fixed.

          Shane Gannon added a comment - - edited

          Still a nice feature to support. Another workaround is the the scons plugin which runs python code.

          Shane Gannon added a comment - - edited Still a nice feature to support. Another workaround is the the scons plugin which runs python code.

          Shane Gannon added a comment -

          A better workaround is to use the PostBuildScript Plugin

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

          Shane Gannon added a comment - A better workaround is to use the PostBuildScript Plugin https://wiki.jenkins-ci.org/display/JENKINS/PostBuildScript+Plugin

          Matt Mumm added a comment -

          It is now April in 2022 and I would find this very useful...

          Matt Mumm added a comment - It is now April in 2022 and I would find this very useful...

            Unassigned Unassigned
            jswager1 Jason Swager
            Votes:
            9 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated: