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

NPE during Copy Artifact in Promotion

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • Jenkins 1.584
      Copy Artifact Plugin 1.32
      Promoted Builds Plugin 2.19

      Master/Slave OS: CentOS 6.5

      Copy Artifact doesn't seem to work inside promotions. For the normal build steps it is fine and copies without problem when it's in a promotion I get this:

      java.lang.NullPointerException
      	at hudson.plugins.copyartifact.CopyArtifact$EnvAction.add(CopyArtifact.java:512)
      	at hudson.plugins.copyartifact.CopyArtifact$EnvAction.access$500(CopyArtifact.java:502)
      	at hudson.plugins.copyartifact.CopyArtifact.perform(CopyArtifact.java:296)
      	at hudson.plugins.promoted_builds.Promotion$RunnerImpl.build(Promotion.java:282)
      	at hudson.plugins.promoted_builds.Promotion$RunnerImpl.doRun(Promotion.java:224)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:533)
      	at hudson.model.Run.execute(Run.java:1754)
      	at hudson.model.Run.run(Run.java:1692)
      	at hudson.plugins.promoted_builds.Promotion.run(Promotion.java:174)
      	at hudson.model.ResourceController.execute(ResourceController.java:89)
      	at hudson.model.Executor.run(Executor.java:240)
      

      The configuration for the promotion is simple:

      <hudson.plugins.promoted__builds.PromotionProcess plugin="promoted-builds@2.19">
        <actions/>
        <keepDependencies>false</keepDependencies>
        <properties/>
        <scm class="hudson.scm.NullSCM"/>
        <canRoam>true</canRoam>
        <disabled>false</disabled>
        <blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
        <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
        <triggers/>
        <concurrentBuild>false</concurrentBuild>
        <conditions/>
        <icon>star-gold</icon>
        <buildSteps>
          <hudson.plugins.copyartifact.CopyArtifact plugin="copyartifact@1.32">
            <project>some-job</project>
            <filter>**/*</filter>
            <target/>
            <excludes/>
            <selector class="hudson.plugins.copyartifact.StatusBuildSelector"/>
            <flatten>true</flatten>
            <doNotFingerprintArtifacts>false</doNotFingerprintArtifacts>
          </hudson.plugins.copyartifact.CopyArtifact>
        </buildSteps>
      </hudson.plugins.promoted__builds.PromotionProcess>
      

      When I downgraded those two plugins (because I figured the culprit was either Copy Artifact or Promoted Builds) to these versions everything worked again:

      • Copy Artifact Plugin 1.30
      • Promoted Builds Plugin 2.17

            ikedam ikedam
            b_dean Ben Dean
            Votes:
            2 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: