From 10f5921e9d05130022de3ceca528d6d794d5e827 Mon Sep 17 00:00:00 2001 From: Jan Stastny Date: Wed, 15 May 2024 11:41:04 +0200 Subject: [PATCH] kie-issues#1212: fix clean* pipelines from tools directory (#1196) Co-authored-by: jstastny-cz --- .ci/jenkins/Jenkinsfile.tools.clean-nightly-images | 4 ++++ .ci/jenkins/Jenkinsfile.tools.clean-old-namespaces | 8 ++++++-- .ci/jenkins/dsl/jobs.groovy | 1 + 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/.ci/jenkins/Jenkinsfile.tools.clean-nightly-images b/.ci/jenkins/Jenkinsfile.tools.clean-nightly-images index 663df4413..cb9527cd7 100644 --- a/.ci/jenkins/Jenkinsfile.tools.clean-nightly-images +++ b/.ci/jenkins/Jenkinsfile.tools.clean-nightly-images @@ -1,3 +1,7 @@ +import org.jenkinsci.plugins.workflow.libs.Library + +@Library('jenkins-pipeline-shared-libraries')_ + pipeline { agent { docker { diff --git a/.ci/jenkins/Jenkinsfile.tools.clean-old-namespaces b/.ci/jenkins/Jenkinsfile.tools.clean-old-namespaces index e5ff002e3..8ce3f946f 100644 --- a/.ci/jenkins/Jenkinsfile.tools.clean-old-namespaces +++ b/.ci/jenkins/Jenkinsfile.tools.clean-old-namespaces @@ -1,8 +1,12 @@ +import org.jenkinsci.plugins.workflow.libs.Library + +@Library('jenkins-pipeline-shared-libraries')_ + pipeline { agent { docker { - image 'quay.io/kiegroup/kogito-ci-build:latest' // TODO to set in branch config - args '-v /var/run/docker.sock:/var/run/docker.sock --group-add docker --group-add input --group-add render' + image env.AGENT_DOCKER_BUILDER_IMAGE + args env.AGENT_DOCKER_BUILDER_ARGS label util.avoidFaultyNodes() } } diff --git a/.ci/jenkins/dsl/jobs.groovy b/.ci/jenkins/dsl/jobs.groovy index 3a0f0e227..b028ca204 100644 --- a/.ci/jenkins/dsl/jobs.groovy +++ b/.ci/jenkins/dsl/jobs.groovy @@ -77,6 +77,7 @@ Utils.isMainBranch(this) && KogitoJobTemplate.createBranchMultibranchPipelineJob void setupCleanOldNamespacesToolsJob() { def jobParams = JobParamsUtils.getBasicJobParams(this, 'kogito-clean-old-namespaces', JobType.TOOLS, "${jenkins_path}/Jenkinsfile.tools.clean-old-namespaces") jobParams.triggers = [ cron : '@midnight' ] + JobParamsUtils.setupJobParamsAgentDockerBuilderImageConfiguration(this, jobParams) KogitoJobTemplate.createPipelineJob(this, jobParams) }