add riot-web bundle
This commit is contained in:
parent
ad7b164533
commit
a27fd619a2
4 changed files with 339 additions and 0 deletions
40
bundles/riot-web/items.py
Normal file
40
bundles/riot-web/items.py
Normal 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,
|
||||
},
|
||||
}
|
27
bundles/riot-web/metadata.py
Normal file
27
bundles/riot-web/metadata.py
Normal 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
|
Loading…
Add table
Add a link
Reference in a new issue