Skip to content

Instantly share code, notes, and snippets.

Mikael Östberg O5ten

Block or report user

Report or block O5ten

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@O5ten
O5ten / jenkins-ensure-timeout.groovy
Created Sep 3, 2018 — forked from seanf/jenkins-ensure-timeout.groovy
Jenkins Groovy script: sets a timeout strategy for any job which doesn't have one
View jenkins-ensure-timeout.groovy
// This script is for Jenkins' Groovy console, and sets a timeout
// strategy for any job which doesn't have one.
// Based on http://janmaterne.wordpress.com/2010/07/11/how-to-check-if-all-hudson-jobs-have-a-timeout/
// Updated and modified by Sean Flanigan.
import hudson.model.*
String describe(strat) {
if (strat instanceof hudson.plugins.build_timeout.impl.ElasticTimeOutStrategy) {
return "Elastic(${strat.timeoutPercentage}, ${strat.numberOfBuilds}, ${strat.timeoutMinutesElasticDefault})"
You can’t perform that action at this time.