Skip to content

Instantly share code, notes, and snippets.

Frédéric MEYROU frederic-meyrou

Block or report user

Report or block frederic-meyrou

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
frederic-meyrou / gist:36cf507866438adb8c44
Last active Sep 8, 2016 — forked from rb2k/gist:8372402
A jenkins script to clean up workspaces on slaves
View gist:36cf507866438adb8c44
// Check if a slave has < 10 GB of free space, wipe out workspaces if it does --skipping folders, preserving offline status
import hudson.model.*;
import hudson.util.*;
import jenkins.model.*;
import hudson.FilePath.FileCallable;
import hudson.slaves.OfflineCause;
import hudson.node_monitors.*;
def sizeLimit = 10 // GB
You can’t perform that action at this time.