Skip to content

Commit

Permalink
check-build-and-verify.sh: show result of running danger.
Browse files Browse the repository at this point in the history
  • Loading branch information
php-coder committed Apr 5, 2017
1 parent f0db775 commit 7dca59c
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions src/main/scripts/ci/check-build-and-verify.sh
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@ fi

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

if [ "$SPRING_PROFILES_ACTIVE" = 'travis' -a "${TRAVIS_PULL_REQUEST:-}" != 'false' ]; then
danger >danger.log 2>&1 || DANGER_FAIL=yes
fi

# Workaround for #538
"$(dirname "$0")/filter-out-htmlunit-messages.pl" <verify-raw.log >verify.log

Expand All @@ -87,6 +91,7 @@ if [ "$RUN_ONLY_INTEGRATION_TESTS" = 'no' ]; then
fi

print_status "$VERIFY_FAIL" 'Run integration tests'
print_status "$DANGER_FAIL" 'Run danger'

echo

Expand All @@ -105,12 +110,8 @@ if [ "$RUN_ONLY_INTEGRATION_TESTS" = 'no' ]; then
print_log findbugs.log 'Run FindBugs'
fi

print_log verify.log 'Run integration tests'

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

# In order to be able debug robot framework test flakes we need to have a report.
# Just encode it to a binary form and dump to console.
Expand All @@ -120,7 +121,7 @@ if fgrep -qs 'status="FAIL"' target/robotframework-reports/output.xml; then
echo "===== REPORT END ====="
fi

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
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

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
exit 1
Expand Down

0 comments on commit 7dca59c

Please sign in to comment.