2021-02-20 10:10:08 +00:00
|
|
|
from bundlewrap.metadata import metadata_to_json
|
2021-02-16 11:49:02 +00:00
|
|
|
|
2021-04-02 16:57:13 +00:00
|
|
|
repo.libs.tools.require_bundle(node, 'nodejs')
|
|
|
|
|
2021-02-16 11:49:02 +00:00
|
|
|
directories = {
|
2021-07-15 16:40:48 +00:00
|
|
|
'/opt/element-web': {}
|
2021-02-16 11:49:02 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
git_deploy = {
|
2021-07-15 16:40:48 +00:00
|
|
|
'/opt/element-web': {
|
2023-06-29 03:39:30 +00:00
|
|
|
'rev': node.metadata.get('element-web/version'),
|
2021-02-16 11:49:02 +00:00
|
|
|
'repo': 'https://github.com/vector-im/element-web.git',
|
|
|
|
'triggers': {
|
|
|
|
'action:element-web_yarn',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
|
|
|
files = {
|
2021-07-15 16:40:48 +00:00
|
|
|
'/opt/element-web/webapp/config.json': {
|
2023-06-29 03:39:30 +00:00
|
|
|
'content': metadata_to_json(node.metadata.get('element-web/config')),
|
2021-02-16 11:49:02 +00:00
|
|
|
'needs': {
|
|
|
|
'action:element-web_yarn',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
|
|
|
actions = {
|
|
|
|
'element-web_yarn': {
|
2021-11-09 17:08:31 +00:00
|
|
|
'command': ' && '.join([
|
|
|
|
'cd /opt/element-web',
|
2022-04-03 06:16:35 +00:00
|
|
|
'yarn install --pure-lockfile --ignore-scripts',
|
|
|
|
'yarn build',
|
2021-11-09 17:08:31 +00:00
|
|
|
]),
|
2021-02-16 11:49:02 +00:00
|
|
|
'needs': {
|
2024-07-19 17:20:23 +00:00
|
|
|
'action:apt_execute_update_commands',
|
2021-05-14 18:01:19 +00:00
|
|
|
'pkg_apt:nodejs',
|
2021-02-16 11:49:02 +00:00
|
|
|
},
|
|
|
|
'triggered': True,
|
|
|
|
},
|
|
|
|
}
|