Skip to content

Instantly share code, notes, and snippets.

Avatar

Marco Davalos marco2704

  • trivago
  • Dusseldorf
View GitHub Profile
@marco2704
marco2704 / builds_cleaner.groovy
Last active Sep 17, 2019
Delete old builds from all configured Jobs in Jenkins, in a selective way.
View builds_cleaner.groovy
import jenkins.model.Jenkins
import hudson.model.Job
int MAX_BUILDS_TO_KEEP = 5
Jenkins.instance.getAllItems(Job.class).each { job ->
job.builds.drop(MAX_BUILDS_TO_KEEP).findAll {
@marco2704
marco2704 / .zshrc
Last active Jul 15, 2018
Basic useful aliases and functions, always happy to add new ones.
View .zshrc
alias ..="cd .."
alias ...="cd ../.."
alias ls="ls -l"
alias lsa="ls -lA"
# docker
alias di="docker images"
alias dps="docker ps"
alias dpa="docker ps -a"
You can’t perform that action at this time.