Giuseppe Lavagetto has uploaded a new change for review. https://gerrit.wikimedia.org/r/134354
Change subject: puppet_compiler: easier jenkins launch with parameters ...................................................................... puppet_compiler: easier jenkins launch with parameters Change-Id: Iecc72af4116fb9fa562ace9bc927ac1f0b6a500b Signed-off-by: Giuseppe Lavagetto <glavage...@wikimedia.org> --- M modules/puppet_compiler/manifests/init.pp M modules/puppet_compiler/templates/nginx_site.erb M modules/puppet_compiler/templates/run_wrapper.erb 3 files changed, 22 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/54/134354/1 diff --git a/modules/puppet_compiler/manifests/init.pp b/modules/puppet_compiler/manifests/init.pp index a6c1d01..e95bdb7 100644 --- a/modules/puppet_compiler/manifests/init.pp +++ b/modules/puppet_compiler/manifests/init.pp @@ -14,7 +14,7 @@ } $install_dir = "${rootdir}/software" - $program_dir = "${install_dir}/compare_puppet-catalogs" + $program_dir = "${install_dir}/compare-puppet-catalogs" $puppetdir = "${program_dir}/external/puppet" diff --git a/modules/puppet_compiler/templates/nginx_site.erb b/modules/puppet_compiler/templates/nginx_site.erb index 81dca46..e93dc66 100644 --- a/modules/puppet_compiler/templates/nginx_site.erb +++ b/modules/puppet_compiler/templates/nginx_site.erb @@ -2,7 +2,7 @@ listen 80; server_name localhost puppet-compiler.wmflabs.org <%= @fqdn -%>; - root <%= scope.lookupvar('puppet_compiler::program_dir') -%>/output; + root <%= scope.lookupvar('::puppet_compiler::program_dir') -%>/output; index index.html index.htm; location / { diff --git a/modules/puppet_compiler/templates/run_wrapper.erb b/modules/puppet_compiler/templates/run_wrapper.erb index 95cb1a7..a426c7f 100755 --- a/modules/puppet_compiler/templates/run_wrapper.erb +++ b/modules/puppet_compiler/templates/run_wrapper.erb @@ -3,4 +3,23 @@ PUPPET_COMPILER_MYSQL_PWD="<%= scope.lookupvar('passwords::puppet_compiler::mysql_password') -%>" export PUPPET_COMPILER_BASEDIR PUPPET_COMPILER_MYSQL_PWD -${PUPPET_COMPILER_BASEDIR}/comparator $@ +# Now support jenkins. Jenkins is not very flexible so we need to support it :) +if [ $1 == "--run-with-envvars" ]; then + OPTS="" + if [ "x${CHANGE}" != "x" ]; then + OPTS="${OPTS} --change ${CHANGE}" + if [ "x${TRANSITION}" != "x" ]; then + OPTS="${OPTS} --transition" + fi; + fi; + if [ "x${NODES}" != "x" ]; then + OPTS="${OPTS} --nodes ${NODES}" + fi; + if [ "x${NUM_THREADS}" != "x" ]; then + OPTS="${OPTS} --numthreads ${NUM_THREADS}" + fi; +else + OPTS=$@ +fi; + +${PUPPET_COMPILER_BASEDIR}/comparator $OPTS -- To view, visit https://gerrit.wikimedia.org/r/134354 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iecc72af4116fb9fa562ace9bc927ac1f0b6a500b Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Giuseppe Lavagetto <glavage...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits