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
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.
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.
Use Archive the artifacts
post-build step, it copies the selected artifacts in the artifacts folder.
Then you will be able to download the file from build page itself.
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' } }
Well, you can right click on "View as unformatted text" and choose "Save link as" to save log on your PC.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With