Thanks for the suggestion. I am completely new to groovy and I tried 
executing the script in post groovy step but it failed in step build.getLog() 
:-(.

On Tuesday, June 14, 2016 at 5:46:45 PM UTC+5:30, rginga wrote:
>
> Ajith, I’m sure you can use a Post-build “Groovy Post-Build” to read the 
> log (build.getLog maybe) and the write it to a file in the workspace. There 
> might be a easier way and this code has not been “tested”.
>
>  
>
> Try something like this:
>
>  
>
> Log = build.getLog();
>
>  
>
> // is we are running on a remote slave, we need the channel
>
>  
>
> if (manager.build.workspace.isRemote()) {
>
>    channel = manager.build.workspace.channel;
>
> }
>
>  
>
> // create a FilePath object to use to write into the remote workspace
>
>  
>
> fp = new hudson.FilePath(channel, build.workspace.toString() + 
> "\\log.filename")
>
>  
>
> if (fp != null) {
>
>       fp.write(Log, null);
>
> }
>
>  
>
> *From:* jenkins...@googlegroups.com <javascript:> [mailto:
> jenkins...@googlegroups.com <javascript:>] *On Behalf Of *AJITH K.R
> *Sent:* Tuesday, June 14, 2016 6:35 AM
> *To:* Jenkins Users
> *Subject:* Need help on usage of Jenkins console data
>
>  
>
> Hi All,
>
>  
>
> How can I get the console output information of Jenkins build under the 
> workspace. I need to use it as an input for reporting purpose. 
>
>  
>
> Thanks,
>
> Ajith
>
> -- 
> 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 <javascript:>.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/jenkinsci-users/f0b1f482-6979-44ee-9b17-52c39ad33928%40googlegroups.com
>  
> <https://urldefense.proofpoint.com/v2/url?u=https-3A__groups.google.com_d_msgid_jenkinsci-2Dusers_f0b1f482-2D6979-2D44ee-2D9b17-2D52c39ad33928-2540googlegroups.com-3Futm-5Fmedium-3Demail-26utm-5Fsource-3Dfooter&d=CwMFaQ&c=3mGIBQKb1eS1YDHb7ax3kFkT2UAGBJ12p2lcECIjhXk&r=SXz9subj7EUWDFIuiAjJSXBLM9pAzGIduhHWvfq5re0&m=gI_Z6d1tPCnjyoBOU8bfj3A0GY5KaYGPhaKbihHYboo&s=c3MUjJiw8kW2GxkYZJQpk4IXsJCdt9EzGkU-tbKPFEI&e=>
> .
> For more options, visit https://groups.google.com/d/optout 
> <https://urldefense.proofpoint.com/v2/url?u=https-3A__groups.google.com_d_optout&d=CwMFaQ&c=3mGIBQKb1eS1YDHb7ax3kFkT2UAGBJ12p2lcECIjhXk&r=SXz9subj7EUWDFIuiAjJSXBLM9pAzGIduhHWvfq5re0&m=gI_Z6d1tPCnjyoBOU8bfj3A0GY5KaYGPhaKbihHYboo&s=hGIHR2SporUecnxVW1vlyEzdKTAJy93KEvRlTA9f5IY&e=>
> .
>

-- 
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-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/46d640fc-22a9-46a4-b5a3-7afe50812066%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to