Rush has submitted this change and it was merged.

Change subject: contint: let us vary localhost vhost unix user
......................................................................


contint: let us vary localhost vhost unix user

The contint::worker_localhost create an Apache document root that needs
to be writable by the user that runs the Jenkins jobs. On permanent
slaves that is 'jenkins-deploy' for legacy reasons, on Nodepool it is
'jenkins'.

Make contint::worker_localhost to require a $owner parameter that is
solely used to set the owner of /srv/localhost-worker

Adjust the only existing call in this repo which is used by permanent
slaves and thus must use jenkins-deploy.

Bug: T136301
Change-Id: I8f62962c515019bb87fa92937c8c5435e6d53359
---
M modules/contint/manifests/worker_localhost.pp
M modules/role/manifests/ci/slave/labs.pp
2 files changed, 18 insertions(+), 3 deletions(-)

Approvals:
  Rush: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/modules/contint/manifests/worker_localhost.pp 
b/modules/contint/manifests/worker_localhost.pp
index 330b3a5..363c123 100644
--- a/modules/contint/manifests/worker_localhost.pp
+++ b/modules/contint/manifests/worker_localhost.pp
@@ -1,11 +1,24 @@
-class contint::worker_localhost {
+# == class contint::worker_localhost
+#
+# Apache vhost for localhost testing (qunit/selenium)
+#
+# === Parameters
+#
+# [*owner*]
+#   Unix user that runs the jobs. Should be:
+#    - Permanent slaves: jenkins-deploy
+#    - Nodepool slaves: jenkins
+#
+class contint::worker_localhost(
+    $owner,
+) {
 
     include ::apache::mod::rewrite
 
     file { '/srv/localhost-worker':
         ensure => directory,
         mode   => '0775',
-        owner  => 'jenkins-deploy',
+        owner  => $owner,
         group  => 'root',
     }
 
diff --git a/modules/role/manifests/ci/slave/labs.pp 
b/modules/role/manifests/ci/slave/labs.pp
index 75bce3d..985b771 100644
--- a/modules/role/manifests/ci/slave/labs.pp
+++ b/modules/role/manifests/ci/slave/labs.pp
@@ -12,7 +12,9 @@
         include ::contint::package_builder
     }
 
-    include contint::worker_localhost
+    class { 'contint::worker_localhost':
+        owner => 'jenkins-deploy',
+    }
 
     contint::tmpfs { 'tmpfs for jenkins CI labs slave':
         # Jobs expect the tmpfs to be in $HOME/tmpfs

-- 
To view, visit https://gerrit.wikimedia.org/r/290938
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I8f62962c515019bb87fa92937c8c5435e6d53359
Gerrit-PatchSet: 3
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Hashar <has...@free.fr>
Gerrit-Reviewer: Hashar <has...@free.fr>
Gerrit-Reviewer: Rush <r...@wikimedia.org>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to