Jenkins - Copy build log from master to a shared drive

1,120 views
Skip to first unread message

Rajasekar Vasudevan

unread,
Aug 5, 2015, 9:33:49 AM8/5/15
to Jenkins Users

Can someone direct me here? I have a simple job configured in Jenkins on a WINDOWS environment (master and all slaves running on windows) and the job is supposed to run on a particular slave. When you build the job, the build log ( log.log) gets stored in ” %JENKINS_HOME%\jobs\\builds\%BUILD_NUMBER%\” on the master.


I do have a Jenkins workspace (which is required when you add a slave node) set on the slave for this job–where nothing gets stored when the job runs.


With this scenario, I would like to copy the build log (log.log file that’s available on the master) to a share drive. Please advise me the way to get this done. I have tried few plugins “Copy to slave”, “Copy Artifact Plugin” and ArtifactDeployer Plugin…I could not get them working to meet what I need

Jovan Jevric

unread,
Aug 12, 2015, 2:55:02 AM8/12/15
to jenkins...@googlegroups.com
I run into same issue. Finally I've solved this by archiving textfile containining link to current workspace(Build ID and Job Name) of job which I'm interested in. Further I've used Log Parser plugin, whcih actually provides full build log propperly formatted in html and txt format which is actually to be arcived as well.
 
Afterwards I've collected all the logs I'm interested in by simply running a sccript on an upstream job.
 
Hope that helps!
Cheers
 
 
Original Message     
   processed by David.fx 
Subject: 
Jenkins - Copy build log from master to a shared drive (05-Aug-2015 15:33)
From:    
To:      
 

Can someone direct me here? I have a simple job configured in Jenkins on a WINDOWS environment (master and all slaves running on windows) and the job is supposed to run on a particular slave. When you build the job, the build log ( log.log) gets stored in ” %JENKINS_HOME%\jobs\\builds\%BUILD_NUMBER%\” on the master.


I do have a Jenkins workspace (which is required when you add a slave node) set on the slave for this job–where nothing gets stored when the job runs.


With this scenario, I would like to copy the build log (log.log file that’s available on the master) to a share drive. Please advise me the way to get this done. I have tried few plugins “Copy to slave”, “Copy Artifact Plugin” and ArtifactDeployer Plugin…I could not get them working to meet what I need

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/e4e9da6d-54d8-47b7-9bd6-3f2085967f8e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Khai Do

unread,
Aug 12, 2015, 8:14:41 PM8/12/15
to Jenkins Users
We use the scp plugin for this use case, https://wiki.jenkins-ci.org/display/JENKINS/SCP+plugin
The plugin has some bugs in the last release and the maintainer hasn't released a new version for a while so you should use the latest from master which means you'll need to build from source.  Just so you are away, we run Jenkins on Linux (ubuntu) and it definitely works for us.  i'm not sure how it will perform in a Windows Env.
Reply all
Reply to author
Forward
0 new messages