Faidon has submitted this change and it was merged.

Change subject: style for zuul.pp
......................................................................


style for zuul.pp

* pass most puppet-lint checks
* reindent to four spaces.
* got rid of nested subclasses
* added documentation blocks for each class

Change-Id: I7cb048245b6cccdaeff170a4476315c05cd7fc26
---
M manifests/role/zuul.pp
1 file changed, 53 insertions(+), 53 deletions(-)

Approvals:
  Andrew Bogott: Looks good to me, but someone else must approve
  Faidon: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/manifests/role/zuul.pp b/manifests/role/zuul.pp
index 4a99ea8..55203bd 100644
--- a/manifests/role/zuul.pp
+++ b/manifests/role/zuul.pp
@@ -1,63 +1,63 @@
+# vim: set sw=4 ts=4 expandtab:
+
 # manifests/role/zuul.pp
 
-class role::zuul {
+# == Class: role::zuul::labs
+#
+# Install the Zuul gating system suitable for the Continuous Integration labs
+# instance. This role can not really be reused on a different instance since it
+# hardcodes several parameters such as the Gerrit IP or the URL hostnames.
+class role::zuul::labs {
+    system_role { 'role::zuul::labs': description => 'Zuul on labs!' }
 
-       system_role { "role::zuul": description => "Zuul gating system for 
Gerrit/Jenkins" }
+    include contint::proxy_zuul
 
-       class labs {
+    # Setup the instance for labs usage
+    zuulwikimedia::instance { 'zuul-labs':
+        jenkins_server   => 'http://10.4.0.172:8080/ci',
+        jenkins_user     => 'zuul',
+        gerrit_server    => '10.4.0.172',
+        gerrit_user      => 'jenkins',
+        url_pattern      => 
'http://integration.wmflabs.org/ci/job/{job.name}/{build.number}/console',
+        status_url       => 'http://integration.wmflabs.org/zuul/status',
+        git_branch       => 'labs',
+        git_dir          => '/var/lib/zuul/git',
+        push_change_refs => false,
+    }
 
-               system_role { "role::zuul::labs": description => "Zuul on 
labs!" }
+} # /role::zuul::labs
 
-               include contint::proxy_zuul
+# Class: role::zuul::production
+#
+# Install the continuous integration Zuul instance for production usage.
+#
+# https://www.mediawiki.org/wiki/Continuous_integration/Zuul
+#
+class role::zuul::production {
+    system_role { 'role::zuul::production': description => 'Zuul on 
production' }
 
-               # Setup the instance for labs usage
-               zuulwikimedia::instance { "zuul-labs":
-                       jenkins_server => 'http://10.4.0.172:8080/ci',
-                       jenkins_user => 'zuul',
-                       gerrit_server => '10.4.0.172',
-                       gerrit_user => 'jenkins',
-                       # Not enabled yet but we need a pattern anyway:
-                       #url_pattern => 
'http://jenkinslogs.wmflabs.org/{change.number}/{change.patchset}/{pipeline.name}/{job.name}/{build.number}',
-                       url_pattern => 
'http://integration.wmflabs.org/ci/job/{job.name}/{build.number}/console',
-                       status_url => 
'http://integration.wmflabs.org/zuul/status',
-                       git_branch => 'labs',
-                       git_dir => '/var/lib/zuul/git',
-                       push_change_refs => false
-               }
+    # We will receive replication of git bare repositories from Gerrit
+    include role::gerrit::production::replicationdest
+    include contint::proxy_zuul
 
-       } # /role::zuul::labs
+    file { '/var/lib/git':
+        ensure => 'directory',
+        owner  => 'gerritslave',
+        group  => 'root',
+        mode   => '0755',
+    }
 
-       class production {
+    # TODO: should require Mount['/srv/ssd']
+    zuulwikimedia::instance { 'zuul-production':
+        jenkins_server   => 'http://127.0.0.1:8080/ci',
+        jenkins_user     => 'zuul-bot',
+        gerrit_server    => 'manganese.wikimedia.org',
+        gerrit_user      => 'jenkins-bot',
+        url_pattern      => 
'https://integration.wikimedia.org/ci/job/{job.name}/{build.number}/console',
+        status_url       => 'https://integration.wikimedia.org/zuul/',
+        git_branch       => 'master',
+        git_dir          => '/srv/ssd/zuul/git',
+        push_change_refs => false,
+    }
 
-               # We will receive replication of git bare repositories from 
Gerrit
-               include role::gerrit::production::replicationdest
-               include contint::proxy_zuul
-
-               file { "/var/lib/git":
-                       ensure => 'directory',
-                       owner => 'gerritslave',
-                       group => 'root',
-                       mode => '0755',
-               }
-
-               system_role { "role::zuul::production": description => "Zuul on 
production" }
-
-               # TODO: should require Mount['/srv/ssd']
-               zuulwikimedia::instance { "zuul-production":
-#                      jenkins_server => 
'https://integration.wikimedia.org/ci',
-                       jenkins_server => 'http://127.0.0.1:8080/ci',
-                       jenkins_user => 'zuul-bot',
-                       gerrit_server => 'manganese.wikimedia.org',
-                       gerrit_user => 'jenkins-bot',
-                       # Not enabled yet but we need a pattern anyway:
-                       #url_pattern => 
'https://integration.wikimedia.org/zuulreport/{change.number}/{change.patchset}/{pipeline.name}/{job.name}/{build.number}',
-                       url_pattern => 
'https://integration.wikimedia.org/ci/job/{job.name}/{build.number}/console',
-                       status_url => 'https://integration.wikimedia.org/zuul/',
-                       git_branch => 'master',
-                       git_dir => '/srv/ssd/zuul/git',
-                       push_change_refs => false
-               }
-
-       } # /role::zuul::production
-
-} # /role::zuul
+} # /role::zuul::production

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7cb048245b6cccdaeff170a4476315c05cd7fc26
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Hashar <[email protected]>
Gerrit-Reviewer: Andrew Bogott <[email protected]>
Gerrit-Reviewer: Faidon <[email protected]>
Gerrit-Reviewer: Hashar <[email protected]>
Gerrit-Reviewer: jenkins-bot

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to