Ohh I forgot to say that I don't get the explanation given in the IRC 
chat.. what was meant by:  "you would probably need to directly artifact 
the log rather than writing it to the workspace" 

On Tuesday, September 2, 2014 5:34:34 PM UTC-4, Angel Vera wrote:
>
> Hi There, 
>
> Hopefully one of you can help me here and guide me on how to proceed. I am 
> not sure I am clear on the email so feel free to ask more questions.
>
> ==================================
> ==========PROBLEM DESCRIPTION
> ==================================
>
> I have a project that is built on a shell script, the entire output of the 
> shell script is sent to the log of that job. The log can be rather lengthy.
>
> *Currently: *If the job succeeded, I don't attach the log. If the job 
> fails I attach the log. 
> *But what I would like is: *
>  1) If the job succeeded, parse the log and attach to the email certain 
> lines (based on a regex) + the last 20 lines of the job. 
>  2) If the job fails, continue to attach the entire log,
>  3) Do all of the formatting of the email with the groovy template. 
>
> ==================================
> ==========WHAT I HAVE DONE
> ==================================
> I am thinking that if there was a way to create the log for the project 
> into the workspace, I can add a post-build step that will parse the .log to 
> my needs. But there seem to be no way to make store the log for the project 
> into the workspace.
>
> I have done a some research and have seen there log parser, that can maybe 
> help me here, but that doesn't fully provide the solution that I want. 
>
> I have also looked at: https://github.com/cboylan/jenkins-log-console-log, 
> but that is a dead end from what I saw posted by <clarkb> at: 
> http://eavesdrop.openstack.org/irclogs/%23openstack-infra/%23openstack-infra.2013-11-26.log.
>  
> According to the post there <zaro> was looking for a way to copy the log 
> into the workspace
>
> --------------------EXCERPT from an IRC LOG-----------------
>
> 2013-11-26T23:08:14  <zaro> clarkb: i think you should release this 
> https://github.com/cboylan/jenkins-log-console-log
> 2013-11-26T23:08:30 
> <https://github.com/cboylan/jenkins-log-console-log2013-11-26T23:08:30>  
> <clarkb> zaro: its upstreamed
> [...]
> 2013-11-26T23:08:48  <clarkb> well it got sucked into the scp plugin
>
> [...]
>
> 2013-11-26T23:09:22  <zaro> clarkb: scp plugin has ability to save console 
> logs?
>
> [...]
>
> 2013-11-26T23:10:09 <mgagne> zaro: yes but it won't copy console 
> timestamps with latest version of console timestamp plugin. 
> 2013-11-26T23:10:15 <clarkb> zaro: it has the ability to copy the console 
> logs to an arbitrary location 
>
> [...]
>
> 2013-11-26T23:11:39 <zaro> huh? so you use the scp plugin to copy build 
> console log to the workspace folder? 2013-11-26T23:11:57 <clarkb> zaro: no 
> we use the scp plugin to copy the console logs to the log server 
> 2013-11-26T23:12:31 <zaro> what if you just want it in your workspace so 
> you can include it as a build artifact? 2013-11-26T23:12:41 <clarkb> zaro: 
> that repo is a dead end, you don't actually want to write the log to the 
> workspace then copy it because then you miss out on the data written to the 
> log after you copy 2013-11-26T23:13:02 <clarkb> zaro: you would need to 
> tackle that differently for the reason mentioned above 
>
> [...]
>
> 2013-11-26T23:13:18 <clarkb> you would probably need to directly artifact 
> the log rather than writing it to the workspace [...]
>
> 2013-11-26T23:16:29  * zaro gets it now.
>
> --------------------EXCERPT from an IRC LOG-----------------
>
>
>
>
>
>

-- 
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to