Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to publish logs in Jenkins?

Tags:

jenkins

I am trying to use Jenkins to run a script on Linux. The script will run on a Linux slave, generate some log files in Jenkins working directory and tar file in a dedicated place on the slave build server.

Is there a way to publish these log files and tar file to the build result, so they can be inspected/downloaded from the build result page.

like image 555
user2784896 Avatar asked Sep 06 '25 22:09

user2784896


1 Answers

Use the "Archive the artfacts" option in the post-build steps of your Jenkins job configuration and specify the paths to the files you want to save. They will then be linked on the build page under "Last successful artifacts".

like image 76
gareth_bowles Avatar answered Sep 12 '25 01:09

gareth_bowles