From f8cdb73c69a7544cbef5532fa6d241491ff3e140 Mon Sep 17 00:00:00 2001 From: Holger Levsen Date: Sun, 30 Aug 2015 22:38:33 +0200 Subject: reproducible: add script to capture build node information (work in progress) --- TODO | 2 +- bin/reproducible_info.sh | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100755 bin/reproducible_info.sh diff --git a/TODO b/TODO index 6d445d29..59968677 100644 --- a/TODO +++ b/TODO @@ -259,7 +259,7 @@ properties: ** reproducible_builder_armhf_4 runs "reproducible_build.sh cbxi4pro0-armhf-rb:2226 wbq0-armhf-rb:2225" * then we have a new script, reproducible_info.sh which just outputs key-value pairs, like "ARCH=armhf", DATETIME="Mo 10. Aug 11:56:22 CEST 2015" and "TZ=UTC" and whatever. -** this script is run on all nodes, but each run is triggered by a single job running on the main node (jenkins atm), so the results can be captured in /srv/reproducible-results/node-information/$NODE and then eg be used by reproducible_html_dashboard.sh to create the table with the differences between 1st and 2nd build... +** this script is run on all nodes, via a for loop on the main node (jenkins atm), as part of dashboard.sh, and the results will be captured in /srv/reproducible-results/node-information/$NODE and then used by reproducible_html_dashboard.sh to create the table with the differences between 1st and 2nd build... *** document usage of -j 24/8/3 in write_explaination_table() ** /srv/reproducible-results/node-information/$NODE could also be read by reproducible_build.sh to determine the dpkg-architecture a node is captable of building, but I think we also want that info to be encoded in the build job names, so probably there's no need to read it... diff --git a/bin/reproducible_info.sh b/bin/reproducible_info.sh new file mode 100755 index 00000000..c73fef65 --- /dev/null +++ b/bin/reproducible_info.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +# Copyright 2015 Holger Levsen +# released under the GPLv=2 + +set -e + +ARCH=$(dpkg --print-architecture) +NUM_CPU=$(grep -c '^processor' /proc/cpuinfo) +DATETIME=$(date +'%Y-%m-%d %H:%M %Z') + +for i in ARCH NUM_CPU DATETIME ; do + echo "$i['$HOSTNAME']=\"${!i}\"" +done -- cgit v1.2.3-54-g00ecf