Skip to content

Instantly share code, notes, and snippets.

@EvilBeaver
EvilBeaver / cleanupJenkinsWorkspaces.groovy
Last active October 18, 2023 10:15 — forked from rb2k/gist:8372402
A jenkins script to clean up workspaces on slaves
// 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.*;
#!/bin/sh
# simple installer for Ubuntu 14.04 https://bitbucket.org/EvilBeaver/1script/wiki/Home
echo 'Starting wgeter latest develops'
wget --continue http://oscript.io/downloads/night-build/latest.zip
unzip -o latest.zip -d osc-engine