Skip to content

Commit 419b4fe

Browse files
committed
fix: test broken build
1 parent 13c9b9d commit 419b4fe

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

live-demo/deploy/.woodpecker.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,23 @@ steps:
2828
- npm audit signatures
2929
- npx semantic-release
3030

31+
slack-on-success:
32+
when:
33+
- event: push
34+
status: success
35+
image: curlimages/curl
36+
commands:
37+
- export $(cat /woodpecker/deploy.vault.env | xargs)
38+
- cd live-demo/deploy && /bin/sh buildSlackNotify.sh success
39+
3140
slack-on-failure:
3241
when:
3342
- event: push
34-
status: [failure, success]
43+
status: failure
3544
image: curlimages/curl
3645
commands:
3746
- export $(cat /woodpecker/deploy.vault.env | xargs)
38-
- cd live-demo/deploy && /bin/sh buildSlackNotify.sh
47+
- cd live-demo/deploy && /bin/sh buildSlackNotify.sh failure
3948

4049
build-live-demo:
4150
when:

live-demo/deploy/buildSlackNotify.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33

44
COMMIT_SHORT_SHA=$(echo $CI_COMMIT_SHA | cut -c1-8)
55

6-
echo 'CI_PREV_PIPELINE_STATUS', $CI_PREV_PIPELINE_STATUS
6+
echo 'STATUS', $1;
77

8-
if [ "$CI_PREV_PIPELINE_STATUS" = "success" ]; then
8+
if [ "$1" = "success" ]; then
99
MESSAGE="Did a build without issues on \`$CI_REPO_NAME/$CI_COMMIT_BRANCH\`. Commit: _${CI_COMMIT_MESSAGE}_ (<$CI_PIPELINE_FORGE_URL|$COMMIT_SHORT_SHA>)"
1010

1111

0 commit comments

Comments
 (0)