Abort hudson builds with huge logs


/ Published in: Groovy
Save to your folder(s)

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


Copy this code and paste it in your HTML
  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()

URL: hudson_kill_huge_build

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.