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

Optional Copy Artifact build step fails if no specific build's build number is given

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: copyartifact-plugin
    • Labels:
      None
    • Environment:
    • Similar Issues:

      Description

      I set up an optional copy artifact step for a specific build, which is determined by a build parameter (e.g. $SOURCE_BUILD_NO).

      The expectation was to leave the parameter empty if I didn't want to copy anything, as it couldn't have copied anything, and move on, just like when entering a build number for a non-existing build.

      That resulted in a build failure.

      FATAL: For input string: "$SOURCE_BUILD_NO"
      java.lang.NumberFormatException: For input string: "$SOURCE_BUILD_NO"
      

      Workarounds:

      • Entering the build number of a non-existing build or build without artifacts, e.g. -5.
      • Using conditional build step plugin.

        Attachments

          Activity

          danielbeck Daniel Beck created issue -
          danielbeck Daniel Beck made changes -
          Field Original Value New Value
          Summary Copy Artifact fails if no specific build number is given Optional Copy Artifact build step fails if no specific build's build number is given
          scm_issue_link SCM/JIRA link daemon made changes -
          Resolution Fixed [ 1 ]
          Status Open [ 1 ] Resolved [ 5 ]
          rtyler R. Tyler Croy made changes -
          Workflow JNJira [ 144898 ] JNJira + In-Review [ 191240 ]
          ikedam ikedam made changes -
          Status Resolved [ 5 ] Closed [ 6 ]

            People

            Assignee:
            mindless Alan Harder
            Reporter:
            danielbeck Daniel Beck
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: