Skip to content

Commit

Permalink
Improve report on Amazon S3 upload.
Browse files Browse the repository at this point in the history
  • Loading branch information
gtrGitHub committed Apr 5, 2017
1 parent 5be3fda commit cb1f701
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
10 changes: 6 additions & 4 deletions build.sh
Expand Up @@ -228,11 +228,13 @@ make installcheck
echo "MSGBLD0300: Make installcheck completed."

if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
echo "MSGBLD0310: This build was triggered by a pull request." >&2
echo "MSGBLD0330: (WARNING) Build artifacts not uploaded to Amazon S3." >&2
echo "MSGBLD0310: This build was triggered by a pull request."
echo "MSGBLD0330: (WARNING) Build artifacts not uploaded to Amazon S3."
fi

if [ "$TRAVIS_REPO_SLUG" != "nest/nest-simulator" ] ; then
echo "MSGBLD0320: This build was from a forked repository and not from nest/nest-simulator." >&2
echo "MSGBLD0330: (WARNING) Build artifacts not uploaded to Amazon S3." >&2
echo "MSGBLD0320: This build was from a forked repository and not from nest/nest-simulator."
echo "MSGBLD0330: (WARNING) Build artifacts not uploaded to Amazon S3."
fi

echo "MSGBLD0340: Build completed."
12 changes: 9 additions & 3 deletions extras/parse_travis_log.py
Expand Up @@ -956,9 +956,6 @@ def build_return_code(status_vera_init,
status_make_install = \
is_message_pair_in_logfile(log_filename, "MSGBLD0270", "MSGBLD0280")

status_amazon_s3_upload = \
not is_message_in_logfile(log_filename, "MSGBLD0330")

ignore_vera = is_message_in_logfile(log_filename, "MSGBLD1010")
ignore_cppcheck = is_message_in_logfile(log_filename, "MSGBLD1020")
ignore_format = is_message_in_logfile(log_filename, "MSGBLD1030")
Expand Down Expand Up @@ -986,6 +983,8 @@ def build_return_code(status_vera_init,
status_tests, number_of_tests_total, number_of_tests_failed = \
testsuite_results(log_filename, "MSGBLD0290", "MSGBLD0300")

# Determine the build result to tell Travis CI whether the build was
# successful or not.
exit_code = build_return_code(status_vera_init,
status_cppcheck_init,
status_format_init,
Expand All @@ -1002,6 +1001,13 @@ def build_return_code(status_vera_init,
ignore_format,
ignore_pep8)

# Only after a successful build, Travis CI will upload the build artifacts
# to Amazon S3.
status_amazon_s3_upload = \
(not is_message_in_logfile(log_filename, "MSGBLD0330") and
is_message_in_logfile(log_filename, "MSGBLD0340") and
exit_code == 0)

print(printable_summary(changed_files,
status_vera_init,
status_cppcheck_init,
Expand Down

0 comments on commit cb1f701

Please sign in to comment.