Forward GnuPG agent from macOS to Linux
Run gpg once as your to create the directory structure
gpg --list-keys
| import com.cloudbees.hudson.plugins.folder.Folder | |
| import hudson.FilePath | |
| import jenkins.model.Jenkins | |
| def boolean isFolder(String name) { | |
| def item = Jenkins.instance.getItemByFullName(name) | |
| return item instanceof Folder | |
| } | |
| def deleteUnusedWorkspace(FilePath root, String path) { |
| /** | |
| Jenkins System Groovy script to clean up workspaces on all slaves. | |
| Check if a slave has < X GB of free space, perform cleanup if it's less. | |
| If slave is idle, wipe out everything in the workspace directory as well any extra configured directories. | |
| If slave is busy, wipe out individual job workspace directories for jobs that aren't running. | |
| Either way, remove custom workspaces also if they aren't in use. | |
| **/ | |
| import hudson.model.*; |