bundles/pretalx: support installing plugins
This commit is contained in:
parent
8503a4a946
commit
da9fe36646
1 changed files with 26 additions and 0 deletions
|
@ -161,3 +161,29 @@ files = {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# run `pip install` one after another due to concurrency issues
|
||||||
|
last_action = 'action:pretalx_install'
|
||||||
|
for plugin_name, plugin_config in node.metadata.get('pretalx/plugins', {}).items():
|
||||||
|
directories[f'/opt/pretalx/plugin_{plugin_name}'] = {}
|
||||||
|
|
||||||
|
git_deploy[f'/opt/pretalx/plugin_{plugin_name}'] = {
|
||||||
|
'repo': plugin_config['repo'],
|
||||||
|
'rev': plugin_config.get('rev', 'master'),
|
||||||
|
'triggers': {
|
||||||
|
f'action:pretalx_install_plugin_{plugin_name}',
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
actions[f'pretalx_install_plugin_{plugin_name}'] = {
|
||||||
|
'command': f'cd /opt/pretalx/plugin_{plugin_name} && /opt/pretalx/venv/bin/pip install --upgrade .',
|
||||||
|
'needs': {
|
||||||
|
last_action,
|
||||||
|
},
|
||||||
|
'triggers': {
|
||||||
|
'svc_systemd:pretalx-web:restart',
|
||||||
|
'svc_systemd:pretalx-worker:restart',
|
||||||
|
},
|
||||||
|
'triggered': True,
|
||||||
|
}
|
||||||
|
last_action = f'action:pretalx_install_plugin_{plugin_name}'
|
||||||
|
|
Loading…
Reference in a new issue