Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to download build output files from jenkins UI console itself

Tags:

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 
like image 449
gibyalex Avatar asked Feb 01 '17 07:02

gibyalex


People also ask

How do I download Jenkins job console output?

In order to read the console output in Jenkins, All you need to do is copy and paste the code as a stage in your pipeline script. After the build is run, a file named buildConsolelog. txt will be stored in the home directory of your project.

How do I download Jenkins workspace?

Use Archive Artifact plugin, to add your workspace into archive folder which will make it easily down-loadable. But be aware that, an artifact in the Jenkins sense is the result of a build - the intended output of the build process.


2 Answers

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'            }     } 
like image 178
RejeeshChandran Avatar answered Sep 19 '22 00:09

RejeeshChandran


Well, you can right click on "View as unformatted text" and choose "Save link as" to save log on your PC.

like image 40
user3650655 Avatar answered Sep 23 '22 00:09

user3650655