ci: Fix the notify step conditions for wpnext
ci/woodpecker/push/build Pipeline was successful Details

This commit is contained in:
Sameer Rahmani 2023-05-14 15:32:45 +01:00
parent 09e16bd43e
commit 66da4b5401
Signed by: lxsameer
GPG Key ID: B0A4AF28AB9FD90B
3 changed files with 44 additions and 54 deletions

View File

@ -7,7 +7,17 @@ clone:
recursive: false
pipeline:
Linters:
group: build
image: lxsameer/serene_ci:13
commands:
- export SERENE_CI=true
- ./builder setup
- export FILES="$(git diff --name-only HEAD HEAD~1)"
- pre-commit run --files "$FILES"
Build:
group: build
image: lxsameer/serene_ci:13
commands:
# Uncomment this when running with a new toolchain for the
@ -17,3 +27,37 @@ pipeline:
volumes:
- serene_config:/root/.serene/
ChatNotify:
image: lxsameer/notify:3
settings:
matrix_room_id:
from_secret: matrix_room
matrix_access_token:
from_secret: matrix_token
matrix_user:
from_secret: matrix_user
matrix_msg: "[${CI_REPO}] Job #${CI_BUILD_NUMBER} <b>failed</b> for branch <b>${CI_COMMIT_BRANCH}</b>. ${CI_BUILD_LINK}"
secrets: [ matrix_room, matrix_token, matrix_user ]
when:
- status: [failure]
MailNotify:
image: lxsameer/woodpecker_mailer:4
settings:
from: ci@serene-lang.org
user:
from_secret: mailer_user
password:
from_secret: mailer_password
to: ${CI_COMMIT_AUTHOR_EMAIL}
subject: "[${CI_REPO}] JOB #${CI_BUILD_NUMBER} failed for branch '${CI_COMMIT_BRANCH}'."
text: |
BUILD: ${CI_BUILD_LINK}
COMMIT: ${CI_COMMIT_LINK}
when:
- status: [failure]
secrets: [ mail_pass, mail_user ]

View File

@ -1,16 +0,0 @@
clone:
git:
image: woodpeckerci/plugin-git
settings:
depth: 1
lfs: false
recursive: false
pipeline:
Linters:
image: lxsameer/serene_ci:13
commands:
- export SERENE_CI=true
- ./builder setup
- export FILES="$(git diff --name-only HEAD HEAD~1)"
- pre-commit run --files "$FILES"

View File

@ -1,38 +0,0 @@
pipeline:
Notify:
image: lxsameer/notify:3
settings:
matrix_room_id:
from_secret: matrix_room
matrix_access_token:
from_secret: matrix_token
matrix_user:
from_secret: matrix_user
matrix_msg: "[${CI_REPO}][<b>FAILED</b>] Branch: ${CI_BRANCH} - Job #${CI_BUILD_NUMBER}"
when:
status: [ failure ]
Mailer:
image: lxsameer/woodpecker_mailer:4
settings:
from: ci@serene-lang.org
user:
from_secret: mail_user
password:
from_secret: mail_pass
to: ${CI_COMMIT_AUTHOR_EMAIL}
subject: "[${CI_REPO}] JOB #${CI_BUILD_NUMBER} - ${CI_PREV_STEP_STATUS}"
text: |
BUILD: ${CI_BUILD_LINK}
COMMIT: ${CI_COMMIT_LINK}
when:
status: [ failure ]
depends_on:
- lint
- build
runs_on: [ failure ]
skip_clone: true