fix notifications

This commit is contained in:
Robert Kaussow 2019-03-14 13:54:36 +01:00
parent f9942e8375
commit 01ad5eeb61
2 changed files with 35 additions and 9 deletions

View File

@ -37,7 +37,7 @@ local PipelineBuild(os='linux', arch='amd64') = {
], ],
}; };
local PipelineNotifications = { local PipelineNotifications(depends_on=[]) = {
kind: "pipeline", kind: "pipeline",
name: "notifications", name: "notifications",
platform: { platform: {
@ -54,17 +54,17 @@ local PipelineNotifications = {
username: { "from_secret": "matrix_username" }, username: { "from_secret": "matrix_username" },
password: { "from_secret": "matrix_password" }, password: { "from_secret": "matrix_password" },
}, },
when: {
status: [ "success", "failure" ],
},
}, },
], ],
depends_on: [ depends_on: depends_on,
"deployment",
],
trigger: {
event: [ "push", "tag" ],
status: [ "success", "failure" ],
},
}; };
[ [
PipelineBuild(os='linux', arch='amd64') PipelineBuild(os='linux', arch='amd64'),
PipelineNotifications(depends_on=[
'linux-adm64',
])
] ]

View File

@ -33,4 +33,30 @@ steps:
username: username:
from_secret: docker_username from_secret: docker_username
---
kind: pipeline
name: notifications
platform:
os: linux
arch: amd64
steps:
- image: plugins/matrix
settings:
homeserver: https://matrix.rknet.org
password:
from_secret: matrix_password
roomid: MtidqQXWWAtQcByBhH:rknet.org
template: "Status: **{{ build.status }}**<br/> Build: [{{ repo.Owner }}/{{ repo.Name }}]({{ build.link }}) ({{ build.branch }}) by {{ build.author }}<br/> Message: {{ build.message }}"
username:
from_secret: matrix_username
when:
status:
- success
- failure
depends_on:
- linux-adm64
... ...