[Qa-jenkins-scm] [Git][qa/jenkins.debian.net][master] reproducible: actually, keep the real_year real, and deal with Dec/Jan which...
Mattia Rizzolo
gitlab at salsa.debian.org
Sat Dec 29 10:24:55 GMT 2018
Mattia Rizzolo pushed to branch master at Debian QA / jenkins.debian.net
Commits:
6f5e46c2 by Mattia Rizzolo at 2018-12-29T10:23:07Z
reproducible: actually, keep the real_year real, and deal with Dec/Jan which are special months for us
The future hosts are 1 year and 1 month (and 1 day) in the future,
therefore where we are in December of year X the future hosts will be in
January of year X+2.
This will still leave a single day of warnings during December 31 (I think).
Signed-off-by: Mattia Rizzolo <mattia at debian.org>
- - - - -
1 changed file:
- bin/reproducible_node_health_check.sh
Changes:
=====================================
bin/reproducible_node_health_check.sh
=====================================
@@ -107,13 +107,14 @@ fi
# (XXX: yes this is hardcoded but meh…)
echo "$(date -u) - testing whether the time is right..."
get_node_ssh_port "$HOSTNAME"
-real_year=2019
+real_year=2018
year=$(date +%Y)
if "$NODE_RUN_IN_THE_FUTURE"; then
if [ "$year" -eq "$real_year" ]; then
echo "Warning, today we came back to the present: $(date -u)."
DIRTY=true
- elif [ "$year" -eq $(( $real_year + 1 )) ] ; then
+ elif [ "$year" -eq "$(("$real_year" + 1))" ] || \
+ [ "$year" -eq "$(("$real_year" + 2))" -a "$(date +%m)" -eq 1]; then
echo "Good, today is the right future: $(date -u)."
else
echo "Warning, today is the wrong future: $(date -u)."
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/commit/6f5e46c24df123b03cb06daeb4f23e01c33f3bee
--
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/commit/6f5e46c24df123b03cb06daeb4f23e01c33f3bee
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/qa-jenkins-scm/attachments/20181229/34681898/attachment-0001.html>
More information about the Qa-jenkins-scm
mailing list