Skip to content

Instantly share code, notes, and snippets.

View antonpiatek's full-sized avatar

Anton Piatek antonpiatek

View GitHub Profile
@antonpiatek
antonpiatek / gist:c74991f7ec54126fc91dd66a290d7520
Last active July 21, 2023 10:56 — forked from rb2k/gist:8372402
A jenkins script to clean up workspaces on slaves
// find old workspace folders on any node (master/slave)
// currently only look for deleted branches of multibranch (pipeline?) jobs, and remove them
// also finds builds older than 90 days. Set flags below to true to actually do deletes
import hudson.model.*;
import hudson.util.*;
import jenkins.model.*;
import hudson.FilePath;
import hudson.FilePath.FileCallable;
import hudson.slaves.OfflineCause;
#!/bin/bash
#
# An init.d script for running a Node.js process as a service using Forever as
# the process monitor. For more configuration options associated with Forever,
# see: https://github.com/nodejitsu/forever
#
# This was written for Debian distributions such as Ubuntu, but should still
# work on RedHat, Fedora, or other RPM-based distributions, since none of the
# built-in service functions are used. So information is provided for both.
#

Keybase proof

I hereby claim:

  • I am antonpiatek on github.
  • I am antonpiatek (https://keybase.io/antonpiatek) on keybase.
  • I have a public key whose fingerprint is 7401 96D3 E037 2F8F 5965 A358 4046 71FD 74B1 FA37

To claim this, I am signing this object: