Skip to content
This repository has been archived by the owner on Sep 18, 2021. It is now read-only.

Commit

Permalink
Improving templating
Browse files Browse the repository at this point in the history
  • Loading branch information
jaypoulz committed Aug 27, 2018
1 parent 67bd1c4 commit 9c942f7
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions src/com/redhat/multiarch/ci/provisioner/Provisioner.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 9c942f7

Please sign in to comment.