[Qa-jenkins-scm] [jenkins.debian.net] 01/02: reproducible: on systems running in the future: reset date to real date at the beginning of deployments, and reset back to the future at the end
Holger Levsen
holger at moszumanska.debian.org
Wed Dec 9 23:18:56 UTC 2015
This is an automated email from the git hooks/post-receive script.
holger pushed a commit to branch master
in repository jenkins.debian.net.
commit e83a85b678693a3950107c192105620b2fac7bf4
Author: Holger Levsen <holger at layer-acht.org>
Date: Thu Dec 10 00:17:31 2015 +0100
reproducible: on systems running in the future: reset date to real date at the beginning of deployments, and reset back to the future at the end
---
update_jdn.sh | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/update_jdn.sh b/update_jdn.sh
index 77f690c..50a6b63 100755
--- a/update_jdn.sh
+++ b/update_jdn.sh
@@ -15,6 +15,16 @@ explain() {
echo "--------------------------------------------"
explain "$(date) - begin deployment update."
+
+# run update at current date
+case $HOSTNAME in
+ profitbricks-build5-amd64|profitbricks-build6-amd64)
+ # set correct date
+ sudo ntpdate -b de.pool.ntp.org
+ ;;
+ *) ;;
+esac
+
#
# set up users and groups
#
@@ -496,3 +506,10 @@ rm -f $TMPFILE
sudo touch $STAMP # so on the next run, only configs newer than this file will be updated
explain "$(date) - finished deployment."
+# set time back to the future
+case $HOSTNAME in
+ profitbricks-build5-amd64|profitbricks-build6-amd64)
+ sudo date --set="+398 days +6 hours + 23 minutes"
+ ;;
+ *) ;;
+esac
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/qa/jenkins.debian.net.git
More information about the Qa-jenkins-scm
mailing list