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

Conditional Build Step plugin crashes when using Artifact Deployer plugin as build step

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      I just tried creating a custom build step using the (multi) conditional build step plugin, adding an "artifact deployer" task to copy files to a remote location during the build process. The job configuration page in Jenkins allowed me to configure the necessary options as expected, but when I went to save the configuration I got an error. Apparently when the conditional build step plugin when to instantiate an instance of the artifact deployer plugin, an exception got thrown. This effectively prevents me from using Jenkins to manage build artifacts using these plugins.

        Attachments

          Activity

          Hide
          leedega Kevin Phillips added a comment -

          I actually posted the versions of all tools and plugins I'm using in my last comment.

          As for your first question, I can't speak as to the internal workings of Jenkins or these plugins. All I know is that there are two different "conditional build step" options:

          • Conditional step (single)
          • Conditional steps (multiple)

          When I create a single conditional step, I am able to choose the Artifact Deployer plugin as the "Builder" option, and saving the job configuration completes successfully. When I attempt to create a multiple job conditional step, I am still able to choose the Artifact Deployer plugin as the "Builder" option, but saving the job configuration throws an exception.

          I would have expected one of two things in these cases:

          • If the Artifact Deployer plugin wasn't supported by the Conditional Build Step plugin then it shouldn't show up as a selectable option when configuring an instance of the latter.
          • If the Artifact Deployer plugin shows up as a selectable option when creating a conditional build step, then the job configuration should save successfully and function correctly

          NOTE: From an end-user perspective that does not understand the internal workings of these plugins, it would also seem more intuitive that the behavior, whatever it may be, would be consistent for both the single and multi-job conditional build steps. The fact that the behavior is currently inconsistent seems odd to me.

          Show
          leedega Kevin Phillips added a comment - I actually posted the versions of all tools and plugins I'm using in my last comment. As for your first question, I can't speak as to the internal workings of Jenkins or these plugins. All I know is that there are two different "conditional build step" options: Conditional step (single) Conditional steps (multiple) When I create a single conditional step, I am able to choose the Artifact Deployer plugin as the "Builder" option, and saving the job configuration completes successfully. When I attempt to create a multiple job conditional step, I am still able to choose the Artifact Deployer plugin as the "Builder" option, but saving the job configuration throws an exception. I would have expected one of two things in these cases: If the Artifact Deployer plugin wasn't supported by the Conditional Build Step plugin then it shouldn't show up as a selectable option when configuring an instance of the latter. If the Artifact Deployer plugin shows up as a selectable option when creating a conditional build step, then the job configuration should save successfully and function correctly NOTE: From an end-user perspective that does not understand the internal workings of these plugins, it would also seem more intuitive that the behavior, whatever it may be, would be consistent for both the single and multi-job conditional build steps. The fact that the behavior is currently inconsistent seems odd to me.
          Hide
          domi Dominik Bartholdi added a comment -

          believe me, its not the intention to have the two behave different!

          Do you have this plugin installed too? https://wiki.jenkins-ci.org/display/JENKINS/Any+Build+Step+Plugin
          and then you have the global "Allowed build steps" option set to "Any build step"?

          ...with this configuration I can reproduce the issue - I don't know the "Any Build Step" plugin very well, but I will lock at it...

          If this is not your configuration, then please let me know how you can reproduce the issue when starting with a fresh jenkins installation

          Show
          domi Dominik Bartholdi added a comment - believe me, its not the intention to have the two behave different! Do you have this plugin installed too? https://wiki.jenkins-ci.org/display/JENKINS/Any+Build+Step+Plugin and then you have the global "Allowed build steps" option set to "Any build step"? ...with this configuration I can reproduce the issue - I don't know the "Any Build Step" plugin very well, but I will lock at it... If this is not your configuration, then please let me know how you can reproduce the issue when starting with a fresh jenkins installation
          Hide
          leedega Kevin Phillips added a comment -

          Sorry if my last comment sounded condescending ... that wasn't my intention

          Anyways, you are correct. I do have the Any Build Step plugin installed as well... maybe that is the one that allowed me to hook the Artifact Deployer as a Conditional Build Step.

          It will take me some time to setup a clean install of Jenkins to create a minimal reproducible environment, but it sounds like you may have already managed to reproduce the critical pieces that I am using. I have several dozen plugins installed atm so it would be hard for me to isolate which ones are possibly interacting with each other at this point, but I will see what I can do.

          Show
          leedega Kevin Phillips added a comment - Sorry if my last comment sounded condescending ... that wasn't my intention Anyways, you are correct. I do have the Any Build Step plugin installed as well... maybe that is the one that allowed me to hook the Artifact Deployer as a Conditional Build Step. It will take me some time to setup a clean install of Jenkins to create a minimal reproducible environment, but it sounds like you may have already managed to reproduce the critical pieces that I am using. I have several dozen plugins installed atm so it would be hard for me to isolate which ones are possibly interacting with each other at this point, but I will see what I can do.
          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/artifactdeployer/ArtifactDeployerBuilder.java
          src/main/java/org/jenkinsci/plugins/artifactdeployer/ArtifactDeployerEntry.java
          src/main/resources/org/jenkinsci/plugins/artifactdeployer/ArtifactDeployerBuilder/config.jelly
          http://jenkins-ci.org/commit/artifactdeployer-plugin/b82141c10221de0a9e7fba0f2f15d251954d60ac
          Log:
          [FIXED JENKINS-18135] inline attributes instead of deprecated newInstance() call, this allows use of Artifactdeployer in ConditionalBuildstep with DataBoundConstructor

          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/artifactdeployer/ArtifactDeployerBuilder.java src/main/java/org/jenkinsci/plugins/artifactdeployer/ArtifactDeployerEntry.java src/main/resources/org/jenkinsci/plugins/artifactdeployer/ArtifactDeployerBuilder/config.jelly http://jenkins-ci.org/commit/artifactdeployer-plugin/b82141c10221de0a9e7fba0f2f15d251954d60ac Log: [FIXED JENKINS-18135] inline attributes instead of deprecated newInstance() call, this allows use of Artifactdeployer in ConditionalBuildstep with DataBoundConstructor
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Gregory Boissinot
          Path:
          pom.xml
          src/main/java/org/jenkinsci/plugins/artifactdeployer/ArtifactDeployerBuilder.java
          src/main/java/org/jenkinsci/plugins/artifactdeployer/ArtifactDeployerEntry.java
          src/main/resources/org/jenkinsci/plugins/artifactdeployer/ArtifactDeployerBuilder/config.jelly
          http://jenkins-ci.org/commit/artifactdeployer-plugin/20268aa1e4eda615c76ff15d1389e80d612e13b5
          Log:
          Merge pull request #4 from imod/master

          [FIXED JENKINS-18135] inline attributes instead of deprecated newInstanc...

          Compare: https://github.com/jenkinsci/artifactdeployer-plugin/compare/f4a98b38a985...20268aa1e4ed

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Gregory Boissinot Path: pom.xml src/main/java/org/jenkinsci/plugins/artifactdeployer/ArtifactDeployerBuilder.java src/main/java/org/jenkinsci/plugins/artifactdeployer/ArtifactDeployerEntry.java src/main/resources/org/jenkinsci/plugins/artifactdeployer/ArtifactDeployerBuilder/config.jelly http://jenkins-ci.org/commit/artifactdeployer-plugin/20268aa1e4eda615c76ff15d1389e80d612e13b5 Log: Merge pull request #4 from imod/master [FIXED JENKINS-18135] inline attributes instead of deprecated newInstanc... Compare: https://github.com/jenkinsci/artifactdeployer-plugin/compare/f4a98b38a985...20268aa1e4ed

            People

            • Assignee:
              gbois Gregory Boissinot
              Reporter:
              leedega Kevin Phillips
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: