Jenkins – How to download build output files from jenkins UI console itself

Jenkinsjenkins-plugins

I am new Jenkins , using jenkins 1.651.3 War deployed on Tomcat6
Is there any way to download Jenkins job’s output file ( my job produced a jar file ) from jenkins UI Console itself ?

So, could anyone suggest me is there any way or plugin available to make the each Jenkins build output files ( like Jar/War) as downloadable from the Jenkins server machine

 [INFO] 
    [INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ NumberGenerator ---
    [INFO] Building jar: /opt/cloudhost/jenkinsHome/jobs/TestGiby/workspace/NumberGenerator/target/NumberGenerator-0.0.1-SNAPSHOT.jar
    [INFO] 
    [INFO] --- maven-install-plugin:2.4:install (default-install) @ NumberGenerator ---
    [INFO] Installing /opt/cloudhost/jenkinsHome/jobs/TestGiby/workspace/NumberGenerator/target/NumberGenerator-0.0.1-SNAPSHOT.jar to /opt/cloudhost/software/maven/mavenRepo/com/giby/maven/NumberGenerator/0.0.1-SNAPSHOT/NumberGenerator-0.0.1-SNAPSHOT.jar
    [INFO] Installing /opt/cloudhost/jenkinsHome/jobs/TestGiby/workspace/NumberGenerator/pom.xml to /opt/cloudhost/software/maven/mavenRepo/com/giby/maven/NumberGenerator/0.0.1-SNAPSHOT/NumberGenerator-0.0.1-SNAPSHOT.pom
    [INFO] ------------------------------------------------------------------------
    [INFO] BUILD SUCCESS
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time: 2.575 s
    [INFO] Finished at: 2017-02-01T05:00:44+00:00
    [INFO] Final Memory: 19M/607M
    [INFO] ------------------------------------------------------------------------
    Finished: SUCCESS

Best Answer

Use Archive the artifacts post-build step, it copies the selected artifacts in the artifacts folder.

Archive the artifacts build step

Then you will be able to download the file from build page itself.

Download build artifacts

For Pipeline you need to add it in the pipeline script itself. Check for the corresponding groovy script for archive the artifacts or find the below example (this is a working code).

post {
    always {
            archive "project/embsw/debug/**/*"
           stash includes: 'project/embsw/debug/project_R0.bin', name: 'debugBuiltArtifacts'
           }
    }
Related Topic