From 565cb9aa1840003ceda06b33e99c63c07cbe5d93 Mon Sep 17 00:00:00 2001 From: retropikzel Date: Fri, 11 Oct 2024 15:23:19 +0300 Subject: [PATCH] Also clean the built in node --- Jenkinsfile | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index be91a94..38ed4f7 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,7 +1,5 @@ pipeline { - agent { - label 'agent2' - } + agent none triggers { cron("59 23 * * 1") // Clean up every monday @@ -12,7 +10,19 @@ pipeline { } stages { - stage('Clean docker images') { + stage('Clean docker on agent2') { + agent { + label 'agent2' + } + steps { + sh 'docker system prune -a -f' + sh 'docker network prune -f' + } + } + stage('Clean docker on built-in-node') { + agent { + label 'built_in_node' + } steps { sh 'docker system prune -a -f' sh 'docker network prune -f'