GitLab CI: print out the image age in seconds

Helps with debugging purposes

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
Peter Hutterer 2018-07-30 12:04:05 +10:00
parent dc877190ec
commit 581fbbea64

View file

@ -151,10 +151,12 @@ variables:
- TODAY_SECS=$(date -u +%s)
- IMG_SECS=$(date -u --date="$IMG_DATE" +%s)
- echo "today $TODAY_SECS, image $IMG_SECS"
- echo "image age $(($TODAY_SECS - $IMG_SECS))s"
# check if image is less than a week old
- test $(($IMG_SECS + 604800)) -gt $TODAY_SECS
# export an artefact telling the next stage that the image is valid
- touch .img_ready
artifacts: