26 lines
473 B
Groovy
26 lines
473 B
Groovy
pipeline {
|
|
agent any
|
|
|
|
triggers {
|
|
cron("*/15 * * * *") // Clean up every 15 minutes
|
|
}
|
|
|
|
options {
|
|
buildDiscarder(logRotator(numToKeepStr: '10', artifactNumToKeepStr: '10'))
|
|
}
|
|
|
|
stages {
|
|
stage('Clean docker images') {
|
|
agent {
|
|
label 'agent1'
|
|
}
|
|
steps {
|
|
sh 'docker system prune -a -f'
|
|
sh 'docker network prune -f'
|
|
}
|
|
}
|
|
}
|
|
|
|
}
|
|
|