mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-03-18 23:47:05 -04:00
add notifications
This commit is contained in:
45
.drone.star
45
.drone.star
@@ -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 [
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user