diff --git a/.ci/jenkins/Jenkinsfile.tools.update-jenkins-dependencies b/.ci/jenkins/Jenkinsfile.tools.update-jenkins-dependencies index 9a9655052..dc18d65fc 100644 --- a/.ci/jenkins/Jenkinsfile.tools.update-jenkins-dependencies +++ b/.ci/jenkins/Jenkinsfile.tools.update-jenkins-dependencies @@ -10,6 +10,8 @@ branchCreated = false pipeline { agent { + image env.AGENT_DOCKER_BUILDER_IMAGE + args env.AGENT_DOCKER_BUILDER_ARGS label util.avoidFaultyNodes('ubuntu') } diff --git a/.ci/jenkins/dsl/jobs.groovy b/.ci/jenkins/dsl/jobs.groovy index b028ca204..2e001dff5 100644 --- a/.ci/jenkins/dsl/jobs.groovy +++ b/.ci/jenkins/dsl/jobs.groovy @@ -116,6 +116,7 @@ void setupUpdateJenkinsDependenciesJob() { GIT_AUTHOR_CREDS_ID: "${GIT_AUTHOR_CREDENTIALS_ID}", GIT_AUTHOR_PUSH_CREDS_ID: "${GIT_AUTHOR_PUSH_CREDENTIALS_ID}", ]) + JobParamsUtils.setupJobParamsAgentDockerBuilderImageConfiguration(this, jobParams) KogitoJobTemplate.createPipelineJob(this, jobParams) } diff --git a/dsl/seed/jenkinsfiles/Jenkinsfile.release.prepare b/dsl/seed/jenkinsfiles/Jenkinsfile.release.prepare index 1dcdc0cda..717f81b9b 100644 --- a/dsl/seed/jenkinsfiles/Jenkinsfile.release.prepare +++ b/dsl/seed/jenkinsfiles/Jenkinsfile.release.prepare @@ -9,6 +9,8 @@ repositoriesToBranch = [] pipeline { agent { + image env.AGENT_DOCKER_BUILDER_IMAGE + args env.AGENT_DOCKER_BUILDER_ARGS label util.avoidFaultyNodes('ubuntu') } diff --git a/dsl/seed/jenkinsfiles/Jenkinsfile.remove.branches b/dsl/seed/jenkinsfiles/Jenkinsfile.remove.branches index e489022f8..a7d9cd6d5 100644 --- a/dsl/seed/jenkinsfiles/Jenkinsfile.remove.branches +++ b/dsl/seed/jenkinsfiles/Jenkinsfile.remove.branches @@ -6,6 +6,8 @@ import org.kie.jenkins.MavenCommand pipeline { agent { + image env.AGENT_DOCKER_BUILDER_IMAGE + args env.AGENT_DOCKER_BUILDER_ARGS label util.avoidFaultyNodes('ubuntu') } diff --git a/dsl/seed/jenkinsfiles/Jenkinsfile.tools.toggle-triggers b/dsl/seed/jenkinsfiles/Jenkinsfile.tools.toggle-triggers index 7048ab022..c13488b27 100644 --- a/dsl/seed/jenkinsfiles/Jenkinsfile.tools.toggle-triggers +++ b/dsl/seed/jenkinsfiles/Jenkinsfile.tools.toggle-triggers @@ -5,6 +5,8 @@ import org.kie.jenkins.MavenCommand pipeline { agent { + image env.AGENT_DOCKER_BUILDER_IMAGE + args env.AGENT_DOCKER_BUILDER_ARGS label util.avoidFaultyNodes('ubuntu') } diff --git a/dsl/seed/jenkinsfiles/Jenkinsfile.update-quarkus-version b/dsl/seed/jenkinsfiles/Jenkinsfile.update-quarkus-version index ae53a5efa..6f655cdbc 100644 --- a/dsl/seed/jenkinsfiles/Jenkinsfile.update-quarkus-version +++ b/dsl/seed/jenkinsfiles/Jenkinsfile.update-quarkus-version @@ -7,6 +7,8 @@ failingRepos = [] pipeline { agent { + image env.AGENT_DOCKER_BUILDER_IMAGE + args env.AGENT_DOCKER_BUILDER_ARGS label util.avoidFaultyNodes('ubuntu') } diff --git a/dsl/seed/jobs/root_jobs.groovy b/dsl/seed/jobs/root_jobs.groovy index 8d7db528e..8e061a64a 100644 --- a/dsl/seed/jobs/root_jobs.groovy +++ b/dsl/seed/jobs/root_jobs.groovy @@ -37,6 +37,7 @@ def jobParams = [ env: [:], jenkinsfile: 'dsl/seed/jenkinsfiles/Jenkinsfile.release.prepare', ] +JobParamsUtils.setupJobParamsAgentDockerBuilderImageConfiguration(this, jobParams) KogitoJobTemplate.createPipelineJob(this, jobParams)?.with { parameters { @@ -83,6 +84,7 @@ def jobParamsRemove = [ env: [:], jenkinsfile: 'dsl/seed/jenkinsfiles/Jenkinsfile.remove.branches', ] +JobParamsUtils.setupJobParamsAgentDockerBuilderImageConfiguration(this, jobParamsRemove) List nonMainBranches = ALL_BRANCHES.split(',').findAll { it != MAIN_BRANCH_NAME } if (nonMainBranches) { diff --git a/dsl/seed/jobs/seed_job_branch.groovy b/dsl/seed/jobs/seed_job_branch.groovy index cb3973f6a..971ebcb23 100644 --- a/dsl/seed/jobs/seed_job_branch.groovy +++ b/dsl/seed/jobs/seed_job_branch.groovy @@ -149,6 +149,9 @@ pipelineJob("${GENERATION_BRANCH}/tools/toggle-dsl-triggers") { env('SEED_CONFIG_FILE_PATH', "${SEED_CONFIG_FILE_PATH}") env('JENKINS_EMAIL_CREDS_ID', Utils.getJenkinsEmailCredsId(this)) + + env('AGENT_DOCKER_BUILDER_IMAGE', Utils.getJenkinsAgentDockerImage(script, 'builder')) + env('AGENT_DOCKER_BUILDER_ARGS', Utils.getJenkinsAgentDockerArgs(script, 'builder')) } definition { diff --git a/dsl/seed/src/main/groovy/org/kie/jenkins/jobdsl/KogitoJobUtils.groovy b/dsl/seed/src/main/groovy/org/kie/jenkins/jobdsl/KogitoJobUtils.groovy index 3d76daef3..7709ba70f 100644 --- a/dsl/seed/src/main/groovy/org/kie/jenkins/jobdsl/KogitoJobUtils.groovy +++ b/dsl/seed/src/main/groovy/org/kie/jenkins/jobdsl/KogitoJobUtils.groovy @@ -141,6 +141,7 @@ class KogitoJobUtils { SEED_CONFIG_FILE_GIT_BRANCH: Utils.getBindingValue(script, 'SEED_CONFIG_FILE_GIT_BRANCH'), SEED_CONFIG_FILE_PATH: Utils.getBindingValue(script, 'SEED_CONFIG_FILE_PATH'), ]) + JobParamsUtils.setupJobParamsAgentDockerBuilderImageConfiguration(script, jobParams) JobParamsUtils.setupJobParamsSeedRepoEnv(script, jobParams) def job = KogitoJobTemplate.createPipelineJob(script, jobParams) job?.with {