Skip to content

Instantly share code, notes, and snippets.

David I. dapperdanman

Block or report user

Report or block dapperdanman

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
dapperdanman / gist:a9ec6bec192fcb62e2fbbe6ab73d27bd
Created Feb 14, 2018 — forked from rb2k/gist:8372402
A jenkins script to clean up workspaces on slaves
View gist:a9ec6bec192fcb62e2fbbe6ab73d27bd
// Check if a slave has < 10 GB of free space, wipe out workspaces if it does
import hudson.model.*;
import hudson.util.*;
import jenkins.model.*;
import hudson.FilePath.FileCallable;
import hudson.slaves.OfflineCause;
import hudson.node_monitors.*;
for (node in Jenkins.instance.nodes) {
You can’t perform that action at this time.