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

Add support for additional output values (e.g nexus arifact links) besides a boolean value

XMLWordPrintable

      Currently, the function nexusArtifactUploader returns only a boolean value (i.e. java.lang.Boolean). It might be a good idea to return additional information from the function other than a boolean value:

      def result = nexusArtifactUploader(...)
      echo result.getOutputLinks() // --> https://my-nexus.com:443/repository/CoolRepo/com/my/platform/unstable_platform/161/unstable-release.zip
      echo result.getResult() // --> True if success
      

       

      Workaround

      To get these links I have to parse Jenkins log:

      while (!currentBuild.rawBuild.getLog(100).join("\n").contains("Uploaded:")) {
          echo "Waiting for NexusArtifactUploader ... \n"         
      }      
      

       

            pskumar448 Suresh Kumar
            amdokamal S. Panchenko
            Votes:
            2 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: