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

preSCMbuildstep plugin - Unable to use multiple Conditional Steps in the Prebuild section of Multi configuration job

    Details

    • Similar Issues:

      Description

      1.) Add a "Conditional steps (multiple)" item to the Prebuild section of a multiple configuration job.
      2.) Use "Strings Match" as the type (don't think this matters).
      3.) "Add step to condition". Select one or more steps to put under this condition.
      4.) Click "Save" button and exit the job.
      5.) Re-"Configure" the Job. The steps added under the multi-conditional step are now gone. No matter what I do, I am unable to add steps under the multiple conditional step.
      Note: I am able to add multi-conditional steps to my project in the normal "build" location.

        Attachments

          Activity

          Hide
          cjo9900 cjo9900 added a comment -

          After some tracing of the form submission, I can see that correct data is sent to the objects.
          However the pre-scm-plugin relies on teh build steps to have a relevant DataBoundConstructor, however the conditionbuilder does not have the correct one and only has the first two parameters in the constructor.

          https://github.com/jenkinsci/conditional-buildstep-plugin/blob/master/src/main/java/org/jenkinsci/plugins/conditionalbuildstep/ConditionalBuilder.java

          Fix is either
          1. Only allow buildsteps with a databoundconstructor(same as is done in conditionalbuildstep)
          2. Correct the conditionalbuildstep DataboundConstructor.

          1 in this case would not solve the issue as the DataboundConstructor is incorrect.
          so we need to correct the conditionalbuildstep plugin.

          I have done a quick hack and proved that correcting the conditionalbuildstep DataboundConstructor solves the issue.
          I now need some time to clean this up and run some more testing on it.

          Show
          cjo9900 cjo9900 added a comment - After some tracing of the form submission, I can see that correct data is sent to the objects. However the pre-scm-plugin relies on teh build steps to have a relevant DataBoundConstructor, however the conditionbuilder does not have the correct one and only has the first two parameters in the constructor. https://github.com/jenkinsci/conditional-buildstep-plugin/blob/master/src/main/java/org/jenkinsci/plugins/conditionalbuildstep/ConditionalBuilder.java Fix is either 1. Only allow buildsteps with a databoundconstructor(same as is done in conditionalbuildstep) 2. Correct the conditionalbuildstep DataboundConstructor. 1 in this case would not solve the issue as the DataboundConstructor is incorrect. so we need to correct the conditionalbuildstep plugin. I have done a quick hack and proved that correcting the conditionalbuildstep DataboundConstructor solves the issue. I now need some time to clean this up and run some more testing on it.
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: c3johnso
          Path:
          src/main/java/org/jenkinsci/plugins/conditionalbuildstep/ConditionalBuilder.java
          http://jenkins-ci.org/commit/conditional-buildstep-plugin/7b44afc5ddc952f0f56e6764a9fd1120c8562880
          Log:
          [FIXED JENKINS-13618] Corrected DataBoundConstructor
          to match the configuration form

          Removed descriptor new instance override as no longer needed.

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: c3johnso Path: src/main/java/org/jenkinsci/plugins/conditionalbuildstep/ConditionalBuilder.java http://jenkins-ci.org/commit/conditional-buildstep-plugin/7b44afc5ddc952f0f56e6764a9fd1120c8562880 Log: [FIXED JENKINS-13618] Corrected DataBoundConstructor to match the configuration form Removed descriptor new instance override as no longer needed.
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: imod
          Path:
          pom.xml
          src/main/java/org/jenkinsci/plugins/conditionalbuildstep/ConditionalBuilder.java
          http://jenkins-ci.org/commit/conditional-buildstep-plugin/92e690e7dbd4c1f2fd2ae8d6972a48defd62fac7
          Log:
          Merge branch 'JENKINS-13618' of https://github.com/cjo9900/conditional-buildstep-plugin

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: imod Path: pom.xml src/main/java/org/jenkinsci/plugins/conditionalbuildstep/ConditionalBuilder.java http://jenkins-ci.org/commit/conditional-buildstep-plugin/92e690e7dbd4c1f2fd2ae8d6972a48defd62fac7 Log: Merge branch ' JENKINS-13618 ' of https://github.com/cjo9900/conditional-buildstep-plugin
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: imod
          Path:
          pom.xml
          http://jenkins-ci.org/commit/conditional-buildstep-plugin/b0828dbd1cc4acf1833269e0314a1d8c3fcf2952
          Log:
          [FIXED JENKINS-13618] use with preSCMbuildstep plugin failed

          Compare: https://github.com/jenkinsci/conditional-buildstep-plugin/compare/7a0846f...b0828db

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: imod Path: pom.xml http://jenkins-ci.org/commit/conditional-buildstep-plugin/b0828dbd1cc4acf1833269e0314a1d8c3fcf2952 Log: [FIXED JENKINS-13618] use with preSCMbuildstep plugin failed Compare: https://github.com/jenkinsci/conditional-buildstep-plugin/compare/7a0846f...b0828db

            People

            • Assignee:
              cjo9900 cjo9900
              Reporter:
              dawggoneone1 Dawg Gone
            • Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: