Posted By

alces on 11/18/13


Tagged

log build Hudson abort jenkins scriptler


Versions (?)

Abort hudson builds with huge logs


 / Published in: Groovy
 

URL: hudson_kill_huge_build

Groovy script for hudson's scripler/script console (for latter case import line could be removed) aborting running builds with loo large logs.

  1. MAX_LOG_MB = 1024
  2.  
  3. import hudson.model.*
  4.  
  5. Hudson.instance.items.lastBuild.findAll{
  6. it && it.state == Run.State.BUILDING && it.logFile.size()/(1024 * 1024) > MAX_LOG_MB
  7. }*.doStop()

Report this snippet  

You need to login to post a comment.