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

5 views
Skip to first unread message

amdokamal@gmail.com (JIRA)

unread,
Sep 2, 2019, 3:30:04 AM9/2/19
to jenkinsc...@googlegroups.com
S. Panchenko created an issue
 
Jenkins / Improvement JENKINS-59177
Add support for additional output values (e.g nexus arifact links) besides a boolean value
Issue Type: Improvement Improvement
Assignee: Suresh Kumar
Components: nexus-artifact-uploader-plugin
Created: 2019-09-02 07:29
Environment: Jenkins ver. 2.164.3 using groovy Pipeline 2.6 and NexusArtifactUploader 2.10
Labels: plugin pipeline
Priority: Minor Minor
Reporter: S. Panchenko

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 (!script.currentBuild.rawBuild.getLog(100).join("\n").contains("Uploaded:")) {
    echo "Waiting for NexusArtifactUploader ... \n"         
}      

 

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

amdokamal@gmail.com (JIRA)

unread,
Sep 2, 2019, 3:33:02 AM9/2/19
to jenkinsc...@googlegroups.com
S. Panchenko updated an issue
Change By: S. Panchenko
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}
 
Reply all
Reply to author
Forward
0 new messages