Commit 9609169903d5a1a259e943b6ac31702bffc18ab9

Authored by Paulo Tada
1 parent ab028446
Exists in mezuro_cookbook

Adding the plugin of mezuro for colab integration

The plugin are installed manualy in cookbooks/mezuro/recipes/prezento.rb
This should be doing by the package colab-deps
cookbooks/colab/recipes/default.rb
... ... @@ -165,6 +165,13 @@ template '/etc/colab/plugins.d/sentry_client.py' do
165 165 notifies :restart, 'service[colab]'
166 166 end
167 167  
  168 +template '/etc/colab/plugins.d/mezuro.py' do
  169 + owner 'root'
  170 + group 'colab'
  171 + mode 0640
  172 + notifies :restart, 'service[colab]'
  173 +end
  174 +
168 175 execute 'colab-admin migrate'
169 176  
170 177 # Static files
... ...
cookbooks/colab/templates/mezuro.py.erb 0 → 100644
... ... @@ -0,0 +1,28 @@
  1 +from django.utils.translation import ugettext_lazy as _
  2 +from colab.plugins.utils.menu import colab_url_factory
  3 +
  4 +name = 'colab_mezuro'
  5 +verbose_name = 'Mezuro Plugin'
  6 +
  7 +upstream = 'http://<%= node['peers']['integration'] %>:8081/mezuro/'
  8 +#middlewares = []
  9 +
  10 +urls = {
  11 + 'include': 'colab_mezuro.urls',
  12 + 'prefix': '^mezuro/',
  13 +}
  14 +
  15 +menu_title = _('Code Quality')
  16 +
  17 +url = colab_url_factory('mezuro')
  18 +
  19 +menu_urls = (
  20 + url(display=_('Projects'), viewname='mezuro',
  21 + kwargs={'path': 'projects'}, auth=False),
  22 + url(display=_('Repositories'), viewname='mezuro',
  23 + kwargs={'path': 'repositories'}, auth=False),
  24 + url(display=_('Configurations'), viewname='mezuro',
  25 + kwargs={'path': 'kalibro_configurations'}, auth=False),
  26 + url(display=_('Reading Groups'), viewname='mezuro',
  27 + kwargs={'path': 'reading_groups'}, auth=False),
  28 +)
... ...
cookbooks/mezuro/recipes/prezento.rb
... ... @@ -34,3 +34,18 @@ execute &#39;prezento:migrate&#39; do
34 34 notifies :restart, 'service[prezento.target]'
35 35 end
36 36  
  37 +#############################################################################
  38 +# The next lines install the mezuro plugin for colab intergration #
  39 +# This shold be removed when the plugin were install thought pkg colab-deps #
  40 +#############################################################################
  41 +
  42 +git '/home/vagrant/colab-mezuro-plugin' do
  43 + repository 'https://github.com/colab/colab-mezuro-plugin.git'
  44 + revision 'master'
  45 +end
  46 +
  47 +execute 'pip:install:plugin' do
  48 + command '/usr/lib/colab/bin/pip install .'
  49 + cwd '/home/vagrant/colab-mezuro-plugin'
  50 + user 'root'
  51 +end
... ...