Skip to content

Instantly share code, notes, and snippets.

@HRMPW
Last active January 13, 2017 00:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save HRMPW/0adbadc50e7caeccc5915f635c6bbfc8 to your computer and use it in GitHub Desktop.
Save HRMPW/0adbadc50e7caeccc5915f635c6bbfc8 to your computer and use it in GitHub Desktop.
//assuming that docker-gc is installed on the agent
pipeline {
agent {
label 'mylabel'
}
stages {
stage ("Build") {
agent {
dockerfile {
filename 'Dockerfile'
reuseNode true
}
}
steps {
echo "Foo"
}
}
}
post {
always {
sh 'docker-gc'
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment