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

View file

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