Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: do not hide error logs in a group #114573

Merged
merged 1 commit into from
Aug 7, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions src/ci/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -154,13 +154,25 @@ fi
# check for clock drifts. An HTTP URL is used instead of HTTPS since on Azure
# Pipelines it happened that the certificates were marked as expired.
datecheck() {
echo "::group::Clock drift check"
# If an error has happened, we do not want to start a new group, because that will collapse
# a previous group that might have contained the error log.
exit_code=$?

if [ $exit_code -eq 0 ]
then
echo "::group::Clock drift check"
fi

echo -n " local time: "
date
echo -n " network time: "
curl -fs --head http://ci-caches.rust-lang.org | grep ^Date: \
| sed 's/Date: //g' || true
echo "::endgroup::"

if [ $exit_code -eq 0 ]
then
echo "::endgroup::"
fi
}
datecheck
trap datecheck EXIT
Expand Down