Skip to content

Commit 1410b5a

Browse files
committed
check-build-and-verify.sh: show result of running danger.
1 parent f0db775 commit 1410b5a

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

src/main/scripts/ci/check-build-and-verify.sh

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,10 @@ fi
6464

6565
mvn --batch-mode verify -Denforcer.skip=true -DskipUnitTests=true >verify-raw.log 2>&1 || VERIFY_FAIL=yes
6666

67+
if [ "$SPRING_PROFILES_ACTIVE" = 'travis' -a "${TRAVIS_PULL_REQUEST:-}" != 'false' ]; then
68+
danger >danger.log 2>&1 || DANGER_FAIL=yes
69+
fi
70+
6771
# Workaround for #538
6872
"$(dirname "$0")/filter-out-htmlunit-messages.pl" <verify-raw.log >verify.log
6973

@@ -88,6 +92,10 @@ fi
8892

8993
print_status "$VERIFY_FAIL" 'Run integration tests'
9094

95+
if [ "$SPRING_PROFILES_ACTIVE" = 'travis' -a "${TRAVIS_PULL_REQUEST:-}" != 'false' ]; then
96+
print_status "$DANGER_FAIL" 'Run danger'
97+
fi
98+
9199
echo
92100

93101
if [ "$RUN_ONLY_INTEGRATION_TESTS" = 'no' ]; then
@@ -108,8 +116,7 @@ fi
108116
print_log verify.log 'Run integration tests'
109117

110118
if [ "$SPRING_PROFILES_ACTIVE" = 'travis' -a "${TRAVIS_PULL_REQUEST:-}" != 'false' ]; then
111-
# danger uses log files and it should be run before these files will be cleaned
112-
danger || DANGER_FAIL=yes
119+
print_log danger.log 'Run danger'
113120
fi
114121

115122
# In order to be able debug robot framework test flakes we need to have a report.
@@ -120,7 +127,7 @@ if fgrep -qs 'status="FAIL"' target/robotframework-reports/output.xml; then
120127
echo "===== REPORT END ====="
121128
fi
122129

123-
rm -f cs.log pmd.log codenarc.log license.log pom.log bootlint.log rflint.log jasmine.log validator.log enforcer.log test.log findbugs.log verify-raw.log verify.log
130+
rm -f cs.log pmd.log codenarc.log license.log pom.log bootlint.log rflint.log jasmine.log validator.log enforcer.log test.log findbugs.log verify-raw.log verify.log danger.log
124131

125132
if [ -n "$CS_FAIL$PMD_FAIL$CODENARC_FAIL$LICENSE_FAIL$POM_FAIL$BOOTLINT_FAIL$RFLINT_FAIL$JASMINE_FAIL$HTML_FAIL$ENFORCER_FAIL$TEST_FAIL$FINDBUGS_FAIL$VERIFY_FAIL$DANGER_FAIL" ]; then
126133
exit 1

0 commit comments

Comments
 (0)