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

BuildStepCompatibilityLayer.perform throws UnsupportedOperation when invoked using classes that subclass Build

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • core

      The following code will throw an unsupported operation.

      FreeStyleBuild mock = Mockito.mock(FreeStyleBuild.class,Mockito.CALLS_REAL_METHODS);		
      ArtifactArchiver artifactArchiver = new ArtifactArchiver("", "", true);
      artifactArchiver.perform(mock, null, null);
      

      I came across the issue when trying to call the ArtifactArchiver via the groovy plugin on a MatrixRun build.

      The BuildStepCompatibilityLayer should check if the implementing BuildStep provides an implementation of the perform(AbstractBuild<?,?> build, Launcher launcher, BuildListener listener)

          [JENKINS-18734] BuildStepCompatibilityLayer.perform throws UnsupportedOperation when invoked using classes that subclass Build

          Brendan Nolan created issue -
          Brendan Nolan made changes -
          Link New: This issue is related to JENKINS-6670 [ JENKINS-6670 ]
          Brendan Nolan made changes -
          Description Original:
          The following code will throw an unsupported operation.

          {code}
          FreeStyleBuild mock = Mockito.mock(FreeStyleBuild.class,Mockito.CALLS_REAL_METHODS);
          ArtifactArchiver artifactArchiver = new ArtifactArchiver("", "", true);
          artifactArchiver.perform(mock, null, null);
          {code}

          I came across the issue when trying to call the ArtifactArchiver via the groovy plugin on a MatrixRun build.

          The BuildStepCompatibilityLayer should check if the implementing BuildStep provides an implementation of the {perform(AbstractBuild<?,?> build, Launcher launcher, BuildListener listener)}
          New: The following code will throw an unsupported operation.

          {code}
          FreeStyleBuild mock = Mockito.mock(FreeStyleBuild.class,Mockito.CALLS_REAL_METHODS);
          ArtifactArchiver artifactArchiver = new ArtifactArchiver("", "", true);
          artifactArchiver.perform(mock, null, null);
          {code}

          I came across the issue when trying to call the ArtifactArchiver via the groovy plugin on a MatrixRun build.

          The BuildStepCompatibilityLayer should check if the implementing BuildStep provides an implementation of the {perform(AbstractBuild<?,?> build, Launcher launcher, BuildListener listener)}
          Summary Original: BuildStepCompatibilityLayer.perform throw UnsupportedOperation when invoked using classes that subclass Build New: BuildStepCompatibilityLayer.perform throws UnsupportedOperation when invoked using classes that subclass Build
          Brendan Nolan made changes -
          Description Original: The following code will throw an unsupported operation.

          {code}
          FreeStyleBuild mock = Mockito.mock(FreeStyleBuild.class,Mockito.CALLS_REAL_METHODS);
          ArtifactArchiver artifactArchiver = new ArtifactArchiver("", "", true);
          artifactArchiver.perform(mock, null, null);
          {code}

          I came across the issue when trying to call the ArtifactArchiver via the groovy plugin on a MatrixRun build.

          The BuildStepCompatibilityLayer should check if the implementing BuildStep provides an implementation of the {perform(AbstractBuild<?,?> build, Launcher launcher, BuildListener listener)}
          New: The following code will throw an unsupported operation.

          {code}
          FreeStyleBuild mock = Mockito.mock(FreeStyleBuild.class,Mockito.CALLS_REAL_METHODS);
          ArtifactArchiver artifactArchiver = new ArtifactArchiver("", "", true);
          artifactArchiver.perform(mock, null, null);
          {code}

          I came across the issue when trying to call the ArtifactArchiver via the groovy plugin on a MatrixRun build.

          The BuildStepCompatibilityLayer should check if the implementing BuildStep provides an implementation of the {{perform(AbstractBuild<?,?> build, Launcher launcher, BuildListener listener)}}
          Oleg Nenashev made changes -
          Status Original: Open [ 1 ] New: In Progress [ 3 ]
          Oleg Nenashev made changes -
          Assignee New: Brendan Nolan [ bstick12 ]
          R. Tyler Croy made changes -
          Workflow Original: JNJira [ 150082 ] New: JNJira + In-Review [ 185463 ]
          Jesse Glick made changes -
          Status Original: In Progress [ 3 ] New: In Review [ 10005 ]
          Oleg Nenashev made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: In Review [ 10005 ] New: Resolved [ 5 ]

            bstick12 Brendan Nolan
            bstick12 Brendan Nolan
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: