bundles/element-web: rename from riot-web, use tagged releases
All checks were successful
bundlewrap/pipeline/head This commit looks good

This commit is contained in:
Franzi 2021-02-16 12:49:02 +01:00
parent d1b1ca7729
commit 9d5d80457f
Signed by: kunsi
GPG key ID: 12E3D2136B818350
5 changed files with 93 additions and 81 deletions

View file

@ -0,0 +1,38 @@
assert node.has_bundle('nodejs')
from json import dumps
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': dumps(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,
},
}

View file

@ -0,0 +1,33 @@
@metadata_reactor.provides(
'nginx/vhosts',
)
def nginx_config(metadata):
return {
'nginx': {
'vhosts': {
metadata.get('element-web/url'): {
'webroot': '/var/www/{}/webapp/'.format(metadata.get('element-web/url')),
'extras': True,
},
},
},
}
@metadata_reactor.provides(
'icinga2_api/element-web/services',
)
def icinga_check_for_new_release(metadata):
return {
'icinga2_api': {
'element-web': {
'services': {
'ELEMENT-WEB UPDATE': {
'command_on_monitored_host': '/usr/local/share/icinga/plugins/check_github_for_new_release vector-im/element-web {}'.format(metadata.get('element-web/version')),
'vars.notification.mail': True,
'check_interval': '60m',
},
},
},
},
}

View file

@ -1,46 +0,0 @@
assert node.has_bundle('nodejs')
from json import dumps
riot_web_root = '/var/www/{}'.format(node.metadata['riot-web']['url'])
directories = {
riot_web_root: {}
}
git_deploy = {
riot_web_root: {
'rev': 'master',
'repo': 'https://github.com/vector-im/riot-web.git',
'triggers': {
'action:riot_yarn_install',
'action:riot_yarn_build',
},
},
}
files = {
riot_web_root + '/webapp/config.json': {
'content': dumps(node.metadata['riot-web']['config']),
'needs': {
'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

@ -1,14 +0,0 @@
@metadata_reactor.provides(
'nginx/vhosts',
)
def nginx_config(metadata):
return {
'nginx': {
'vhosts': {
metadata.get('riot-web/url', None): {
'webroot': '/var/www/{}/webapp/'.format(metadata.get('riot-web/url', None)),
'extras': True,
},
},
},
}

View file

@ -1,6 +1,7 @@
nodes['htz.ex42-1048908'] = {
'bundles': {
'dovecot',
'element-web',
'gitea',
'jenkins-ci',
'matrix-media-repo',
@ -13,7 +14,6 @@ nodes['htz.ex42-1048908'] = {
'php',
'postfixadmin',
'redis',
'riot-web',
'rspamd',
'postgresql',
'radicale',
@ -87,6 +87,27 @@ nodes['htz.ex42-1048908'] = {
'cron': {
'telekom_nervkram': vault.decrypt('encrypt$gAAAAABfqXi23M96wrSLhqlbhqgePYX06LjPXfyQU2y_07kqYYLztj_PhS1-dk4r5FiiL2Ofmx5iCKW1sZNqiQSuHj2uKaitH0GnwHqj5CI2JwkAS9HrFxw=').format_into('0 0 * * * root date | mail -s \'daily test mail \' -r postmaster@mx0.kunbox.net {}'),
},
'element-web': {
'url': 'chat.franzi.business',
'version': 'v1.7.21',
'config': {
'default_server_name': 'franzi.business',
'brand': 'franzi.business',
'showLabsSettings': True,
'integrations_ui_url': 'https://dimension.franzi.business/riot',
'integrations_rest_url': 'https://dimension.franzi.business/api/v1/scalar',
'integrations_widgets_urls': ['https://dimension.franzi.business/widgets'],
'default_theme': 'dark',
'defaultCountryCode': 'DE',
'features': {
'feature_bridge_state': 'labs',
'feature_font_scaling': 'labs',
'feature_irc_ui': 'labs',
'feature_mjolnir': 'labs',
'feature_presence_in_room_list': 'labs',
},
},
},
'gitea': {
'version': '1.13.2',
'sha256': '4d7d3fc63666cc9c94e32c1e70422c30c1ee8f905004eeb7cd812051721601cc',
@ -314,26 +335,6 @@ nodes['htz.ex42-1048908'] = {
'kunsi': vault.decrypt('encrypt$gAAAAABgJ3tp1DTK0ssglKSsHxlf7p3soDtdSPpgBqyABcHTFGPdnb7ym1an7WXK7idWhx1Tyqf_CLL0IcoMPPoOR-sgzGQJBKXKhPtib6JoPjCzAUphmbo='),
},
},
'riot-web': {
'url': 'chat.franzi.business',
'config': {
'default_server_name': 'franzi.business',
'brand': 'franzi.business',
'showLabsSettings': True,
'integrations_ui_url': 'https://dimension.franzi.business/riot',
'integrations_rest_url': 'https://dimension.franzi.business/api/v1/scalar',
'integrations_widgets_urls': ['https://dimension.franzi.business/widgets'],
'default_theme': 'dark',
'defaultCountryCode': 'DE',
'features': {
'feature_bridge_state': 'labs',
'feature_font_scaling': 'labs',
'feature_irc_ui': 'labs',
'feature_mjolnir': 'labs',
'feature_presence_in_room_list': 'labs',
},
},
},
'rspamd': {
'ignore_spam_check_for_ips': {
# entropia