Hashar has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/77090


Change subject: rake task to generate puppet documentation
......................................................................

rake task to generate puppet documentation

Change-Id: I2918ad0bd2345209ba54d14172eca3b26bcbae21
---
M .gitignore
A doc/README
M rakefile
3 files changed, 24 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/90/77090/1

diff --git a/.gitignore b/.gitignore
index a92803b..d34eff6 100644
--- a/.gitignore
+++ b/.gitignore
@@ -11,3 +11,7 @@
 *.pyc
 
 /private/
+
+# Automatically generated documentation:
+/doc/*
+!/doc/README
diff --git a/doc/README b/doc/README
new file mode 100644
index 0000000..0a818d9
--- /dev/null
+++ b/doc/README
@@ -0,0 +1,7 @@
+This directory is intended to hold the puppet automatically generated
+documentation.  To build it locally, execute the doc rake task in the root
+directory:
+
+ rake doc
+
+Then point your browser to the generated index.html
diff --git a/rakefile b/rakefile
index 0709256..d70addf 100644
--- a/rakefile
+++ b/rakefile
@@ -131,6 +131,19 @@
        }
 end
 
+desc "Build documentation"
+task :doc do
+       base_dir = File.dirname(__FILE__)
+       doc_cmd = ["puppet doc",
+               "--mode rdoc",
+               "--all",  # build all references
+               "--manifestdir #{base_dir}/manifests",
+               "--modulepath #{base_dir}/modules",
+       ].join(' ')
+       puts "Running #{doc_cmd}"
+       system(doc_cmd)
+end
+
 desc "Lint puppet files"
 task :lint => :run_puppet_lint
 

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

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

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

Reply via email to