jenkins-automaintenance/Jenkinsfile

28 lines
468 B
Groovy

pipeline {
agent {
label 'agent2'
}
triggers {
cron("* 0 * * 1")
}
options {
buildDiscarder(logRotator(numToKeepStr: '10', artifactNumToKeepStr: '10'))
}
stages {
stage('Clean docker images') {
agent {
label 'agent2'
}
steps {
sh 'docker system prune -a -f'
sh 'docker network prune -f'
}
}
}
}