Search code examples
jenkinscontinuous-integrationslaveconsole-output

Jenkins: save console output on executing slave server


I already searched a lot for any solution but I couldn't find anything... I try to save the console output of my current build [last build] on my slave server, which executes the build. I saw that the log file is stored on master server as well so I hope this is possible for my slave, too.

I already tried to parse the .html document of the master server [http://'myIp'/job/'jobname'/lastBuild/consoleFull] with a python but it didn't work successful in my build process..it just works after the build is complete.

Is there any opportunity to save the console output on my slave server OR on a network drive? I want to add this step in my build process, too, so it would be nice to save the output as a post-build-action.

OS: both servers (slave and master) are running on Win7 64bit

Thanks for your help!

Michael


Solution

  • Here is a solution to write the console log in your workspace and do a copy on a network drive.

    To get a copy of the console log, you can use Console log plugin.

    You have to build this plugin from the sources and install it manually from the Manage plugins section :(

    Some instruction: https://wiki.jenkins-ci.org/display/JENKINS/Plugin+tutorial

    I've installed this plugin on my Jenkins server (LTS 1.625.3) and it works well.

    Next, you can add this post-build step to get the console log:

    enter image description here

    Finally, you can use the Publish Over CIFS plugin to copy the log file on a network share (with a post-build task).