Franziska Kunsmann
ebcf8e4445
All checks were successful
bundlewrap/pipeline/head This commit looks good
72 lines
2.2 KiB
Python
72 lines
2.2 KiB
Python
directories = {
|
|
'/opt/matrix-media-repo': {
|
|
'owner': 'matrix-media-repo',
|
|
'group': 'matrix-media-repo',
|
|
},
|
|
'/opt/matrix-media-repo/src': {
|
|
'owner': 'matrix-media-repo',
|
|
'group': 'matrix-media-repo',
|
|
},
|
|
'/var/matrix/media': {
|
|
'owner': 'matrix-media-repo',
|
|
'group': 'matrix-media-repo',
|
|
},
|
|
}
|
|
|
|
users = {
|
|
'matrix-media-repo': {
|
|
'home': '/opt/matrix-media-repo',
|
|
},
|
|
}
|
|
|
|
files = {
|
|
'/opt/matrix-media-repo/config.yaml': {
|
|
'owner': 'matrix-media-repo',
|
|
'content_type': 'mako',
|
|
'triggers': {
|
|
'svc_systemd:matrix-media-repo:restart',
|
|
},
|
|
},
|
|
'/etc/systemd/system/matrix-media-repo.service': {
|
|
'triggers': {
|
|
'action:systemd-reload',
|
|
'svc_systemd:matrix-media-repo:restart',
|
|
},
|
|
},
|
|
}
|
|
|
|
git_deploy = {
|
|
'/opt/matrix-media-repo/src': {
|
|
'repo': 'https://github.com/turt2live/matrix-media-repo.git',
|
|
'rev': node.metadata['matrix-media-repo']['version'],
|
|
'triggers': {
|
|
'action:matrix-media-repo_build',
|
|
'svc_systemd:matrix-media-repo:restart',
|
|
},
|
|
},
|
|
}
|
|
|
|
actions = {
|
|
'matrix-media-repo_build': {
|
|
'command': \
|
|
'chown -R matrix-media-repo:matrix-media-repo /opt/matrix-media-repo/src && ' + \
|
|
'sudo -u matrix-media-repo bash -c "cd /opt/matrix-media-repo/src && ' + \
|
|
'GOBIN=/opt/matrix-media-repo/src/bin go install -v ./cmd/compile_assets && ' + \
|
|
'/opt/matrix-media-repo/src/bin/compile_assets && ' + \
|
|
'GOBIN=/opt/matrix-media-repo/src/bin go install -ldflags \\\"' + \
|
|
'-X github.com/turt2live/matrix-media-repo/common/version.GitCommit=$(cat /opt/matrix-media-repo/src/.bundlewrap_git_deploy) ' + \
|
|
'-X github.com/turt2live/matrix-media-repo/common/version.Version={}\\\" '.format(node.metadata['matrix-media-repo']['version']) + \
|
|
'-v ./cmd/..."',
|
|
'triggered': True,
|
|
},
|
|
}
|
|
|
|
svc_systemd = {
|
|
'matrix-media-repo': {
|
|
'needs': {
|
|
'action:matrix-media-repo_build',
|
|
'file:/etc/systemd/system/matrix-media-repo.service',
|
|
'file:/opt/matrix-media-repo/config.yaml',
|
|
},
|
|
},
|
|
}
|