From 9c942f781dc39f73b3cfda57b7399368010b0632 Mon Sep 17 00:00:00 2001 From: Jeremy Poulin Date: Sun, 26 Aug 2018 20:41:16 -0400 Subject: [PATCH] Improving templating --- .../ci/provisioner/Provisioner.groovy | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/src/com/redhat/multiarch/ci/provisioner/Provisioner.groovy b/src/com/redhat/multiarch/ci/provisioner/Provisioner.groovy index ad5c8c0..b257fce 100644 --- a/src/com/redhat/multiarch/ci/provisioner/Provisioner.groovy +++ b/src/com/redhat/multiarch/ci/provisioner/Provisioner.groovy @@ -165,21 +165,21 @@ class Provisioner { templateData.job_group = config.jobgroup templateData.hostrequires = config.hostrequires templateData.hooks = [postUp: [connectToMaster: config.runOnSlave]] - templateData.extra_vars = '{' + - '"rpm_key_imports":[],' + - '"jenkins_master_repositories":[],' + - '"jenkins_master_download_repositories":[],' + - '"jslave_name":"' + "${host.name}" + '",' + - '"jslave_label":"' + "${host.name}" + '",' + - '"arch":"' + "${host.arch}" + '",' + - '"jenkins_master_url":"' + "${config.jenkinsMasterUrl}" + '",' + - '"jenkins_slave_username":"' + "${script.JENKINS_SLAVE_USERNAME}" + '",' + - '"jenkins_slave_password":"' + "${script.JENKINS_SLAVE_PASSWORD}" + '",' + - '"jswarm_version":"3.9",' + - '"jswarm_filename":"swarm-client-{{ jswarm_version }}.jar",' + - '"jswarm_extra_args":"' + "${config.jswarmExtraArgs}" + '",' + - '"jenkins_slave_repositories":[{"name":"epel","mirrorlist":"https://mirrors.fedoraproject.org/metalink?arch=\$basearch&repo=epel-7"}]' + - '}' + templateData.extra_vars = [ + "rpm_key_imports":[], + "jenkins_master_repositories":[], + "jenkins_master_download_repositories":[], + "jslave_name":"${host.name}", + "jslave_label":"${host.name}", + "arch":"${host.arch}", + "jenkins_master_url":"${config.jenkinsMasterUrl}", + "jenkins_slave_username":"${script.JENKINS_SLAVE_USERNAME}", + "jenkins_slave_password":"${script.JENKINS_SLAVE_PASSWORD}", + "jswarm_version":"3.9", + "jswarm_filename":"swarm-client-{{ jswarm_version }}.jar", + "jswarm_extra_args":"${config.jswarmExtraArgs}", + "jenkins_slave_repositories":[["name":"epel","mirrorlist":"https://mirrors.fedoraproject.org/metalink?arch=\$basearch&repo=epel-7"]] + ] def templateDataJson = JsonOutput.toJson(templateData) templateDataJson