bundlewrap/bundles/element-web/items.py
Franziska Kunsmann 014b6029c5
All checks were successful
bundlewrap/pipeline/head This commit looks good
nodes/htz.ex42-1048908: update element-web config
2021-02-20 11:10:08 +01:00

38 lines
873 B
Python

assert node.has_bundle('nodejs')
from bundlewrap.metadata import metadata_to_json
element_web_root = '/var/www/{}'.format(node.metadata['element-web']['url'])
directories = {
element_web_root: {}
}
git_deploy = {
element_web_root: {
'rev': node.metadata['element-web']['version'],
'repo': 'https://github.com/vector-im/element-web.git',
'triggers': {
'action:element-web_yarn',
},
},
}
files = {
element_web_root + '/webapp/config.json': {
'content': metadata_to_json(node.metadata['element-web']['config']),
'needs': {
'action:element-web_yarn',
},
},
}
actions = {
'element-web_yarn': {
'command': 'cd ' + element_web_root + ' && yarn install && yarn build',
'needs': {
'pkg_apt:yarn',
},
'triggered': True,
},
}