From bdf761ad9577c0eb628e08af23341302af256453 Mon Sep 17 00:00:00 2001 From: retropikzel Date: Sun, 8 Feb 2026 09:05:18 +0200 Subject: [PATCH] Run daily. Dont stop on error --- Jenkinsfile | 30 ++++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index c684df7..4195f6b 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -4,7 +4,7 @@ pipeline { } triggers { - cron('0 0 * * *') + cron('@daily') } options { @@ -17,7 +17,10 @@ pipeline { label 'agent1' } steps { - sh 'sh kill_days_containers.sh' + catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') { + sh 'sh kill_days_containers.sh' + sh 'docker system prune -a -f' + } } } stage('Clean docker images agent2') { @@ -25,8 +28,10 @@ pipeline { label 'agent2' } steps { - sh 'sh kill_days_containers.sh' - sh 'docker system prune -a -f' + catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') { + sh 'sh kill_days_containers.sh' + sh 'docker system prune -a -f' + } } } stage('Clean docker images agent3') { @@ -34,8 +39,21 @@ pipeline { label 'agent3' } steps { - sh 'sh kill_days_containers.sh' - sh 'docker system prune -a -f' + catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') { + sh 'sh kill_days_containers.sh' + sh 'docker system prune -a -f' + } + } + } + stage('Clean docker images agent4') { + agent { + label 'agent3' + } + steps { + catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') { + sh 'sh kill_days_containers.sh' + sh 'docker system prune -a -f' + } } } }