From b8a36437e420504463f0c3dd79e4661a50fd9804 Mon Sep 17 00:00:00 2001 From: Nicolas Glayre Date: Tue, 13 Oct 2015 08:33:05 +0200 Subject: [PATCH 1/5] client_url is hardcoded in slave.pp, this commit intends to give it a custom path --- manifests/slave.pp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/manifests/slave.pp b/manifests/slave.pp index 5624ff3d8..6c03e324c 100644 --- a/manifests/slave.pp +++ b/manifests/slave.pp @@ -93,12 +93,13 @@ $install_java = $jenkins::params::install_java, $ensure = 'running', $enable = true + $maven_repo_url = 'http://maven.jenkins-ci.org/content/repositories/releases', ) inherits jenkins::params { validate_string($tool_locations) $client_jar = "swarm-client-${version}-jar-with-dependencies.jar" - $client_url = "http://maven.jenkins-ci.org/content/repositories/releases/org/jenkins-ci/plugins/swarm-client/${version}/" + $client_url = "${maven_repo_url}/org/jenkins-ci/plugins/swarm-client/${version}/" $quoted_ui_user = shellquote($ui_user) $quoted_ui_pass = shellquote($ui_pass) From 13d883c8c6716d49bdcc7da7a5d78b697171847a Mon Sep 17 00:00:00 2001 From: Nicolas Glayre Date: Tue, 13 Oct 2015 08:52:51 +0200 Subject: [PATCH 2/5] Typo, forgot a coma --- manifests/slave.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifests/slave.pp b/manifests/slave.pp index 6c03e324c..319fc5652 100644 --- a/manifests/slave.pp +++ b/manifests/slave.pp @@ -92,7 +92,7 @@ $tool_locations = undef, $install_java = $jenkins::params::install_java, $ensure = 'running', - $enable = true + $enable = true, $maven_repo_url = 'http://maven.jenkins-ci.org/content/repositories/releases', ) inherits jenkins::params { From 24d2e5e93b6956a4be5bb378a761fb1dd1f4c00d Mon Sep 17 00:00:00 2001 From: Nicolas Glayre Date: Tue, 13 Oct 2015 12:03:03 +0200 Subject: [PATCH 3/5] Granted the possibility to give full path to client_url --- manifests/slave.pp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/manifests/slave.pp b/manifests/slave.pp index 319fc5652..e0d34075f 100644 --- a/manifests/slave.pp +++ b/manifests/slave.pp @@ -93,13 +93,17 @@ $install_java = $jenkins::params::install_java, $ensure = 'running', $enable = true, + $client_url = undef, $maven_repo_url = 'http://maven.jenkins-ci.org/content/repositories/releases', ) inherits jenkins::params { validate_string($tool_locations) $client_jar = "swarm-client-${version}-jar-with-dependencies.jar" - $client_url = "${maven_repo_url}/org/jenkins-ci/plugins/swarm-client/${version}/" + $client_url = $client_url ? { + undef => "http://maven.jenkins-ci.org/content/repositories/releases/org/jenkins-ci/plugins/swarm-client/${version}/", + default => $client_url, + } $quoted_ui_user = shellquote($ui_user) $quoted_ui_pass = shellquote($ui_pass) From fc3353030ad54b783bbe76eb00f1b0f08f5a2a3a Mon Sep 17 00:00:00 2001 From: Nicolas Glayre Date: Tue, 13 Oct 2015 12:34:59 +0200 Subject: [PATCH 4/5] Fixed synatx issue --- manifests/slave.pp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/manifests/slave.pp b/manifests/slave.pp index e0d34075f..a43bb1671 100644 --- a/manifests/slave.pp +++ b/manifests/slave.pp @@ -93,16 +93,16 @@ $install_java = $jenkins::params::install_java, $ensure = 'running', $enable = true, - $client_url = undef, + $source = undef, $maven_repo_url = 'http://maven.jenkins-ci.org/content/repositories/releases', ) inherits jenkins::params { validate_string($tool_locations) $client_jar = "swarm-client-${version}-jar-with-dependencies.jar" - $client_url = $client_url ? { + $client_url = $source ? { undef => "http://maven.jenkins-ci.org/content/repositories/releases/org/jenkins-ci/plugins/swarm-client/${version}/", - default => $client_url, + default => $source, } $quoted_ui_user = shellquote($ui_user) $quoted_ui_pass = shellquote($ui_pass) From 410e1164512b8142b9c3360d7ca719077452f77e Mon Sep 17 00:00:00 2001 From: Nicolas Glayre Date: Tue, 13 Oct 2015 17:00:20 +0200 Subject: [PATCH 5/5] Forgot to remove yet useless param --- manifests/slave.pp | 1 - 1 file changed, 1 deletion(-) diff --git a/manifests/slave.pp b/manifests/slave.pp index a43bb1671..cfb17f0cc 100644 --- a/manifests/slave.pp +++ b/manifests/slave.pp @@ -94,7 +94,6 @@ $ensure = 'running', $enable = true, $source = undef, - $maven_repo_url = 'http://maven.jenkins-ci.org/content/repositories/releases', ) inherits jenkins::params { validate_string($tool_locations)