Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: modules/web/manifests/server.pp

Issue 29336202: Issue 3637 - Generate source code documentation on the web server (Closed)
Patch Set: Fix generation commands Created Feb. 10, 2016, 2:05 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « modules/web/files/sitescripts ('k') | modules/web/templates/adblockplus.org.conf.erb » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: modules/web/manifests/server.pp
===================================================================
--- a/modules/web/manifests/server.pp
+++ b/modules/web/manifests/server.pp
@@ -104,6 +104,7 @@
file {[
"/var/cache/$repository",
"/var/www/$vhost",
+ "/var/www/docs",
]:
ensure => directory,
owner => www,
@@ -122,4 +123,41 @@
user => www,
minute => '*/10',
}
+
+ # We have to set up the APT source and install the jsdoc package via npm
+ # manually. Once we're on Puppet 3, we can use the official nodejs module for
+ # all this: https://forge.puppetlabs.com/puppetlabs/nodejs
+
+ apt::source {'nodesource':
+ location => 'https://deb.nodesource.com/node_4.x',
+ release => 'precise',
+ repos => 'main',
+ key => '68576280',
+ key_content => template('web/nodesource.gpg.key.erb'),
+ }
+
+ package {'nodejs':
+ require => Apt::Source['nodesource'],
+ }
+
+ exec {'install_jsdoc':
+ command => 'npm install --global jsdoc',
+ path => ['/usr/bin/'],
+ require => Package['nodejs'],
+ onlyif => 'test ! -x /usr/bin/jsdoc',
+ }
+
+ package {'doxygen':}
+
+ cron {'generate_docs':
+ ensure => present,
+ require => [
+ Exec['fetch_sitescripts', 'install_jsdoc'],
+ Package['doxygen'],
+ File['/var/www/docs'],
+ ],
+ command => 'python -m sitescripts.docs.bin.generate_docs',
+ user => www,
+ minute => '5-55/10',
+ }
}
« no previous file with comments | « modules/web/files/sitescripts ('k') | modules/web/templates/adblockplus.org.conf.erb » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld