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

      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"         
      }      
      

       

          [JENKINS-59177] Add support for additional output values (e.g nexus arifact links) besides a boolean value

          S. Panchenko created issue -
          S. Panchenko made changes -
          Description Original: 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:

          {code}
          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
          {code}
           
          h6.Workaround
          To get these links I have to parse Jenkins log:
          {code}
          while (!script.currentBuild.rawBuild.getLog(100).join("\n").contains("Uploaded:")) {
              echo "Waiting for NexusArtifactUploader ... \n"
          }
          {code}
           
          New: 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:

          {code}
          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
          {code}
           
          h6.Workaround
          To get these links I have to parse Jenkins log:
          {code}
          while (!currentBuild.rawBuild.getLog(100).join("\n").contains("Uploaded:")) {
              echo "Waiting for NexusArtifactUploader ... \n"
          }
          {code}
           
          Ramil Hamzin made changes -
          Assignee Original: Suresh Kumar [ pskumar448 ] New: Ramil Hamzin [ ramzes ]
          Ramil Hamzin made changes -
          Assignee Original: Ramil Hamzin [ ramzes ] New: Suresh Kumar [ pskumar448 ]

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

              Created:
              Updated: