add notifications

This commit is contained in:
Michael Barz
2020-10-26 17:59:53 +01:00
parent 6ac052c53e
commit d0959cdd3a

View File

@@ -67,7 +67,11 @@ config = {
'webUISharingFolderAdvancedPermissionMultipleUsers',
],
}
}
},
'rocketchat': {
'channel': 'ocis-internal',
'from_secret': 'private_rocketchat',
},
}
def getTestSuiteNames():
keys = config['modules'].keys()
@@ -119,12 +123,14 @@ def main(ctx):
readme(ctx),
badges(ctx),
docs(ctx),
updateDeployment(ctx)
updateDeployment(ctx),
notify(),
]
if '[docs-only]' in (ctx.build.title + ctx.build.message):
pipelines = docs(ctx)
pipelines['depends_on'] = []
pipelines = [ pipelines, notify()]
else:
pipelines = before + stages + after
@@ -1322,6 +1328,41 @@ def updateDeployment(ctx):
}
}
def notify():
return {
'kind': 'pipeline',
'type': 'docker',
'name': 'chat-notifications',
'clone': {
'disable': True
},
'steps': [
{
'name': 'notify-rocketchat',
'image': 'plugins/slack:1',
'pull': 'always',
'settings': {
'webhook': {
'from_secret': config['rocketchat']['from_secret']
},
'channel': config['rocketchat']['channel']
}
}
],
'depends_on': [],
'trigger': {
'ref': [
'refs/heads/master',
'refs/heads/release*',
'refs/tags/**',
],
'status': [
'failure',
'success',
]
}
}
def frontend(module):
return [
{