diff options
-rwxr-xr-x | bin/jenkins_node_wrapper.sh | 4 | ||||
-rwxr-xr-x | bin/reproducible_info.sh | 4 | ||||
-rwxr-xr-x | bin/reproducible_nodes_info.sh | 32 | ||||
-rw-r--r-- | job-cfg/reproducible.yaml | 10 |
4 files changed, 45 insertions, 5 deletions
diff --git a/bin/jenkins_node_wrapper.sh b/bin/jenkins_node_wrapper.sh index cf2dd3b4..054ea2a3 100755 --- a/bin/jenkins_node_wrapper.sh +++ b/bin/jenkins_node_wrapper.sh @@ -56,8 +56,6 @@ fi set "dummy" ${SSH_ORIGINAL_COMMAND} shift -info "remote_host called with $*" - allowed_cmds=() if [[ "$*" =~ /bin/nc\ localhost\ 4949 ]] ; then @@ -67,6 +65,8 @@ elif [[ "$*" =~ rebootstrap_.* ]] ; then REBOOTSTRAPSH="/srv/jenkins/bin/rebootstrap.sh $@" export LC_ALL=C exec $REBOOTSTRAPSH; croak "Exec failed"; +elif [ "$1" = "/srv/jenkins/bin/reproducible_info" ] ; then + exec /srv/jenkins/bin/reproducible_info.sh "$2" ; croak "Exec failed"; elif [ "$1" = "/srv/jenkins/bin/reproducible_build.sh" ] && ( [ "$2" = "1" ] || [ "$2" = "2" ] ) ; then exec /srv/jenkins/bin/reproducible_build.sh "$2" "$3" "$4" "$5" ; croak "Exec failed"; elif [[ "$*" =~ rsync\ --server\ --sender\ .*\ .\ /srv/reproducible-results/tmp.* ]] ; then diff --git a/bin/reproducible_info.sh b/bin/reproducible_info.sh index 41a4c630..e6d0bb54 100755 --- a/bin/reproducible_info.sh +++ b/bin/reproducible_info.sh @@ -11,7 +11,5 @@ CPU_MODEL=$(cat /proc/cpuinfo |grep "model name"|head -1|cut -d ":" -f2|xargs ec DATETIME=$(date +'%Y-%m-%d %H:%M %Z') for i in ARCH NUM_CPU CPU_MODEL DATETIME ; do - if [ "$1" = "$i" ] ; then - echo "${!i}" - fi + echo "$i=${!i}" done diff --git a/bin/reproducible_nodes_info.sh b/bin/reproducible_nodes_info.sh new file mode 100755 index 00000000..6c6ab7ed --- /dev/null +++ b/bin/reproducible_nodes_info.sh @@ -0,0 +1,32 @@ +#!/bin/bash + +# Copyright © 2015 Holger Levsen <holger@layer-acht.org> +# released under the GPLv=2 + +DEBUG=false +. /srv/jenkins/bin/common-functions.sh +common_init "$@" + +# common code defining db access +. /srv/jenkins/bin/reproducible_common.sh + +TARGET_DIR=/srv/reproducible-results/node-information/ +mkdir -p $TARGET_DIR +TMPFILE_SRC=$(mktemp) +TMPFILE_NODE=$(mktemp) + +for NODE in bpi0-armhf-rb.debian.net hb0-armhf-rb.debian.net wbq0-armhf-rb.debian.net cbxi4pro0-armhf-rb.debian.net profitbricks-build1-amd64.debian.net profitbricks-build2-amd64.debian.net ; do + # call jenkins_master_wrapper.sh so we only need to track different ssh ports in one place... + /srv/jenkins/bin/jenkins_master_wrapper.sh $NODE dummy-job /srv/jenkins/bin/reproducible_info.sh > $TMPFILE_SRC + for KEY in ARCH NUM_CPU CPU_MODEL DATETIME ; do + VALUE=$(egrep "^$KEY=" $TMPFILE_SRC | cut -d "=" -f2-) + if [ ! -z "$VALUE" ] ; then + echo "$KEY=$VALUE" >> $TMPFILE_NODE + fi + done + if [ -s $TMPFILE_NODE ] ; then + mv $TMPFILE_NODE $TARGET_DIR/$NODE + fi + rm -f $TMPFILE_SRC $TMPFILE_NODE +done + diff --git a/job-cfg/reproducible.yaml b/job-cfg/reproducible.yaml index 64370e42..d241415d 100644 --- a/job-cfg/reproducible.yaml +++ b/job-cfg/reproducible.yaml @@ -350,6 +350,10 @@ - job-template: defaults: reproducible + name: '{name}_nodes_info' + +- job-template: + defaults: reproducible name: '{name}_json' - job-template: @@ -740,6 +744,12 @@ my_shell: '/srv/jenkins/bin/reproducible_create_meta_pkg_sets.sh' my_recipients: 'qa-jenkins-scm@lists.alioth.debian.org' my_node: '' + - '{name}_nodes_info': + my_description: 'Collect various information from build nodes used for reproducible builds.' + my_timed: '37 13 * * *' + my_shell: '/srv/jenkins/bin/reproducible_nodes_info.sh' + my_recipients: 'qa-jenkins-scm@lists.alioth.debian.org' + my_node: '' - '{name}_breakages': my_description: 'Generate an HTML page with CI issues (packages with incoherent status or files that should or should not be there).' my_timed: '30 0 * * *' |