podman/contrib/cirrus/timestamp.awk
Ed Santiago 9fad55c87f CI - various fixes
Primary purpose: upgrade crun to 0.14 on f31, in hopes of
eliminating the 'cgroups.freeze' flake that is plaguing CI.

While I'm at it:
- remove a no-longer-needed dnf upgrade that was running in CI
  itself (not image building, in each actual CI run). The purpose
  was to upgrade conmon, but that was added a long time ago and
  the required conmon is now in stable. The effect of this
  dnf upgrade today was simply to cause flakes when fedora
  repos were offline.

- remove a no-longer-needed check for varlink.

- networking.sh : add a timeout! 'openssl s_client' will happily
  hang forever if a host is unreachable, which means we waste
  two hours waiting for Cirrus to time out.

- timestamp.awk : include date (not just time) in START/END msgs.
  There are times when I'm looking at a CI log and it is ultra
  important to know if it is from yesterday or today.

- add progress messages in some places where I've previously
  struggled to understand context in logs; and improve some
  unlikely error messages to include script name.

...then, after all that, wrote a new README about how to to
all this. Hope it helps someone.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2020-07-25 12:32:53 -06:00

21 lines
540 B
Awk

# This script is intended to be piped into by automation, in order to
# mark output lines with timing information. For example:
# /path/to/command |& awk --file timestamp.awk
BEGIN {
STARTTIME=systime()
printf "[%s] START", strftime("%T")
printf " - All [+xxxx] lines that follow are relative to %s.\n", strftime("%FT%T")
}
{
printf "[%+05ds] %s\n", systime()-STARTTIME, $0
}
END {
printf "[%s] END", strftime("%T")
printf " - [%+05ds] total duration since %s\n", systime()-STARTTIME, strftime("%FT%T")
}