add riot-web bundle

This commit is contained in:
Franzi 2020-02-29 14:42:54 +00:00
parent ad7b164533
commit a27fd619a2
Signed by: kunsi
GPG key ID: 12E3D2136B818350
4 changed files with 339 additions and 0 deletions

40
bundles/riot-web/items.py Normal file
View file

@ -0,0 +1,40 @@
riot_web_root = '/var/www/{}'.format(node.metadata['riot-web']['url'])
directories = {
riot_web_root: {}
}
pkg_apt = {
'yarn': {},
}
git_deploy = {
riot_web_root: {
'needs': [
'directory:' + riot_web_root,
],
'rev': 'master',
'repo': 'https://github.com/vector-im/riot-web.git',
'triggers': [
'action:riot_yarn_install',
'action:riot_yarn_build',
],
},
}
actions = {
'riot_yarn_install': {
'command': 'cd ' + riot_web_root + ' && yarn install',
'needs': [
'pkg_apt:yarn',
],
'triggered': True,
},
'riot_yarn_build': {
'command': 'cd ' + riot_web_root + ' && yarn build',
'needs': [
'action:riot_yarn_install',
],
'triggered': True,
},
}

View file

@ -0,0 +1,27 @@
@metadata_processor
def nodejs_apt_repos(metadata):
return {
'apt': {
'repos': {
'yarn': {
'key': '72ECF46A56B4AD39C907BBB71646B01B86E50310',
'items': [
'deb https://dl.yarnpkg.com/debian/ stable main',
],
},
'node': {
'key': '9FD3B784BC1C6FC31A8A0A1C1655A0AB68576280',
'items': [
'deb https://deb.nodesource.com/node_10.x buster main',
'deb-src https://deb.nodesource.com/node_10.x buster main',
],
},
},
'unattended-upgrades': {
'origins': {
'deb.nodesource.com',
'dl.yarnpkg.com',
},
},
},
}, DEFAULTS, DONE