31
31
32
32
33
33
commands :
34
- gitter_notify :
34
+ gitter_notify_unless_pr :
35
35
description : " Posts a notification to the main room on Gitter (if not running on a PR)."
36
36
parameters :
37
37
event :
@@ -44,6 +44,8 @@ commands:
44
44
name : " Gitter notification"
45
45
when : << parameters.condition >>
46
46
command : |
47
+ [[ $CI_PULL_REQUEST == "" ]] || { echo "Running on a PR - notification skipped."; exit 0; }
48
+
47
49
[[ "<< parameters.event >>" == "failure" ]] && message=" ❌ Nightly job **${CIRCLE_JOB}** failed on **${CIRCLE_BRANCH}**. Please see [build #${CIRCLE_BUILD_NUM}](${CIRCLE_BUILD_URL}) for details."
48
50
[[ "<< parameters.event >>" == "success" ]] && message=" ✅ Nightly job **${CIRCLE_JOB}** succeeded on **${CIRCLE_BRANCH}**. Please see [build #${CIRCLE_BUILD_NUM}](${CIRCLE_BUILD_URL}) for details."
49
51
@@ -55,17 +57,17 @@ commands:
55
57
--header "Authorization: Bearer ${GITTER_API_TOKEN}" \
56
58
--data "{\"text\":\"${message}\"}"
57
59
58
- gitter_notify_failure :
60
+ gitter_notify_failure_unless_pr :
59
61
description : " Posts a failure notification to the main room on Gitter (if not running on a PR)."
60
62
steps :
61
- - gitter_notify :
63
+ - gitter_notify_unless_pr :
62
64
event : failure
63
65
condition : on_fail
64
66
65
- gitter_notify_success :
67
+ gitter_notify_success_unless_pr :
66
68
description : " Posts a success notification to the main room on Gitter (if not running on a PR)."
67
69
steps :
68
- - gitter_notify :
70
+ - gitter_notify_unless_pr :
69
71
event : success
70
72
condition : on_success
71
73
@@ -562,9 +564,9 @@ jobs:
562
564
steps :
563
565
- checkout
564
566
- run : *run_build
565
- - gitter_notify_failure
566
567
- store_artifacts : *artifacts_solc
567
568
- persist_to_workspace : *artifacts_executables
569
+ - gitter_notify_failure_unless_pr
568
570
569
571
b_ubu_release : &b_ubu_release
570
572
<< : *b_ubu
@@ -650,10 +652,10 @@ jobs:
650
652
git clone https://github.com/ethereum/solidity-fuzzing-corpus /tmp/solidity-fuzzing-corpus
651
653
mkdir -p test_results
652
654
scripts/regressions.py -o test_results
653
- - gitter_notify_failure
654
- - gitter_notify_success
655
655
- store_test_results : *store_test_results
656
656
- store_artifacts : *artifacts_test_results
657
+ - gitter_notify_failure_unless_pr
658
+ - gitter_notify_success_unless_pr
657
659
658
660
b_archlinux :
659
661
<< : *base_archlinux
@@ -852,15 +854,15 @@ jobs:
852
854
- when :
853
855
condition : true
854
856
<< : *steps_soltest
855
- - gitter_notify_failure
857
+ - gitter_notify_failure_unless_pr
856
858
857
859
t_ubu_ubsan_clang_cli :
858
860
<< : *base_ubuntu2004_clang
859
861
steps :
860
862
- when :
861
863
condition : true
862
864
<< : *steps_cmdline_tests
863
- - gitter_notify_failure
865
+ - gitter_notify_failure_unless_pr
864
866
865
867
t_ems_solcjs :
866
868
<< : *base_ubuntu2004
@@ -940,8 +942,8 @@ jobs:
940
942
- when :
941
943
condition : <<parameters.gitter_notify>>
942
944
steps :
943
- - gitter_notify_failure
944
- - gitter_notify_success
945
+ - gitter_notify_failure_unless_pr
946
+ - gitter_notify_success_unless_pr
945
947
946
948
b_win : &b_win
947
949
<< : *base_win_powershell
0 commit comments