user2784896
user2784896

Reputation: 309

How to publish logs in 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.

Upvotes: 4

Views: 9413

Answers (3)

zeroboo
zeroboo

Reputation: 8945

You may need Log Parser plugin for extracting info from log

Upvotes: 0

Harshana Nanayakkara
Harshana Nanayakkara

Reputation: 184

"Archive the artfacts" is one option, or you could copy the logs to %JenkinsDir%\%BUILD_ID%\archive folder as a post build action. Then you can see them as build artifacts.

Upvotes: 0

gareth_bowles
gareth_bowles

Reputation: 21130

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".

Upvotes: 5

Related Questions