-
Improvement
-
Resolution: Unresolved
-
Minor
-
Jenkins ver. 2.164.3 using groovy Pipeline 2.6 and NexusArtifactUploader 2.10
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
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} |
Assignee | Original: Suresh Kumar [ pskumar448 ] | New: Ramil Hamzin [ ramzes ] |
Assignee | Original: Ramil Hamzin [ ramzes ] | New: Suresh Kumar [ pskumar448 ] |