bundles/mx-puppet-discord: github is archived, gitlab is the new hotness

This commit is contained in:
Franzi 2022-09-10 18:10:14 +02:00
parent 0f6b757a34
commit 944c66354b
Signed by: kunsi
GPG key ID: 12E3D2136B818350
2 changed files with 18 additions and 14 deletions

View file

@ -6,6 +6,10 @@ directories = {
'owner': 'mx-puppet-discord',
'group': 'mx-puppet-discord',
},
'/opt/mx-puppet-discord/.yarn': {
'owner': 'mx-puppet-discord',
'group': 'mx-puppet-discord',
},
'/opt/mx-puppet-discord/src': {
'owner': 'mx-puppet-discord',
'group': 'mx-puppet-discord',
@ -47,29 +51,31 @@ files = {
git_deploy = {
'/opt/mx-puppet-discord/src': {
'repo': 'https://github.com/matrix-discord/mx-puppet-discord.git',
'rev': node.metadata.get('mx-puppet-discord/version', 'master'),
'repo': 'https://gitlab.com/mx-puppet/discord/mx-puppet-discord.git',
'rev': node.metadata.get('mx-puppet-discord/version', 'main'),
'triggers': {
'action:mx-puppet-discord_chown',
'action:mx-puppet-discord_npm_install',
'action:mx-puppet-discord_npm_build',
'action:mx-puppet-discord_yarn_install',
'action:mx-puppet-discord_yarn_build',
},
},
}
actions = {
'mx-puppet-discord_chown': {
'command':
'chown -R mx-puppet-discord:mx-puppet-discord /opt/mx-puppet-discord/src && '
'command': ' && '.join([
'chown -R mx-puppet-discord:mx-puppet-discord /opt/mx-puppet-discord/.npm',
'chown -R mx-puppet-discord:mx-puppet-discord /opt/mx-puppet-discord/.yarn',
'chown -R mx-puppet-discord:mx-puppet-discord /opt/mx-puppet-discord/src',
]),
'needs': {
'directory:/opt/mx-puppet-discord/.npm',
'user:mx-puppet-discord',
},
'triggered': True,
},
'mx-puppet-discord_npm_install': {
'command': 'cd /opt/mx-puppet-discord/src && sudo -u mx-puppet-discord npm install',
'mx-puppet-discord_yarn_install': {
'command': 'cd /opt/mx-puppet-discord/src && sudo -u mx-puppet-discord yarn install',
'needs': {
'action:mx-puppet-discord_chown',
'pkg_apt:nodejs',
@ -77,10 +83,10 @@ actions = {
},
'triggered': True,
},
'mx-puppet-discord_npm_build': {
'command': 'cd /opt/mx-puppet-discord/src && sudo -u mx-puppet-discord npm run-script build',
'mx-puppet-discord_yarn_build': {
'command': 'cd /opt/mx-puppet-discord/src && sudo -u mx-puppet-discord yarn build',
'needs': {
'action:mx-puppet-discord_npm_install',
'action:mx-puppet-discord_yarn_install',
},
'triggers': {
'svc_systemd:mx-puppet-discord:restart',
@ -92,7 +98,7 @@ actions = {
svc_systemd = {
'mx-puppet-discord': {
'needs': {
'action:mx-puppet-discord_npm_build',
'action:mx-puppet-discord_yarn_build',
'file:/etc/systemd/system/mx-puppet-discord.service',
'file:/opt/mx-puppet-discord/config.yaml',
'file:/opt/mx-puppet-discord/registration.yaml',

View file

@ -281,8 +281,6 @@ nodes['rx300'] = {
'domain': 'rss.franzi.business',
},
'mx-puppet-discord': {
# https://github.com/matrix-discord/mx-puppet-discord/issues/201
'version': '46051012ec3d4e21bd9febc2519ce08f3e13f5e0',
'homeserver': {
'domain': 'franzi.business',
'url': 'https://matrix.franzi.business',