Hashar has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/331312 )

Change subject: Introduce linters using rake
......................................................................

Introduce linters using rake

Add a Rakefile and depends on puppet-syntax/puppet-lint. That lets one
easily check syntax of manifests and templates as well as puppet style
recommandation (puppet-lint).

Ignore puppet-lint 80 chars line limit.

Fix an unquoted file mode in manifests/hadoop/nodemanager.pp

Bug: T154894
Change-Id: Id8e19ee14cc1673e84278b30a5e4eddf5192ea77
---
A .puppet-lint.rc
A Gemfile
A Gemfile.lock
A Rakefile
M manifests/hadoop/nodemanager.pp
5 files changed, 44 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet/cdh 
refs/changes/12/331312/1

diff --git a/.puppet-lint.rc b/.puppet-lint.rc
new file mode 100644
index 0000000..b0d12b7
--- /dev/null
+++ b/.puppet-lint.rc
@@ -0,0 +1 @@
+--no-80chars-check
diff --git a/Gemfile b/Gemfile
new file mode 100644
index 0000000..d7aa5df
--- /dev/null
+++ b/Gemfile
@@ -0,0 +1,4 @@
+gem 'rake'
+gem 'puppet', '~> 3.7.0'
+gem 'puppet-lint', '1.1.0'
+gem 'puppet-syntax'
diff --git a/Gemfile.lock b/Gemfile.lock
new file mode 100644
index 0000000..e7d1aa2
--- /dev/null
+++ b/Gemfile.lock
@@ -0,0 +1,23 @@
+GEM
+  specs:
+    facter (2.4.6)
+    hiera (1.3.4)
+      json_pure
+    json_pure (2.0.2)
+    puppet (3.7.5)
+      facter (> 1.6, < 3)
+      hiera (~> 1.0)
+      json_pure
+    puppet-lint (1.1.0)
+    puppet-syntax (2.2.0)
+      rake
+    rake (12.0.0)
+
+PLATFORMS
+  ruby
+
+DEPENDENCIES
+  puppet (~> 3.7.0)
+  puppet-lint (= 1.1.0)
+  puppet-syntax
+  rake
diff --git a/Rakefile b/Rakefile
new file mode 100644
index 0000000..00edcc8
--- /dev/null
+++ b/Rakefile
@@ -0,0 +1,15 @@
+require 'bundler/setup'
+require 'puppet-lint/tasks/puppet-lint'
+require 'puppet-syntax/tasks/puppet-syntax'
+
+task :default => [:help]
+
+desc 'Run all build/tests commands (CI entry point)'
+task :test => [
+    :syntax,
+    :lint,
+]
+
+task :help do
+    system "rake -T"
+end
diff --git a/manifests/hadoop/nodemanager.pp b/manifests/hadoop/nodemanager.pp
index f3bd20b..151ce3c 100644
--- a/manifests/hadoop/nodemanager.pp
+++ b/manifests/hadoop/nodemanager.pp
@@ -15,7 +15,7 @@
         content => template('cdh/hadoop/hadoop-yarn-nodemanager.default.erb'),
         owner   => 'root',
         group   => 'root',
-        mode    => 0644,
+        mode    => '0644',
     }
 
     # Some Hadoop jobs need Zookeeper libraries, but for some reason they

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id8e19ee14cc1673e84278b30a5e4eddf5192ea77
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet/cdh
Gerrit-Branch: master
Gerrit-Owner: Hashar <[email protected]>

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

Reply via email to