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

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

XMLWordPrintable

    • 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)

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

              Created:
              Updated:
              Resolved: