[Qa-jenkins-scm] [Git][qa/jenkins.debian.net][master] 3 commits: reproducible: refactoring
Holger Levsen
gitlab at salsa.debian.org
Thu Sep 27 00:57:13 BST 2018
Holger Levsen pushed to branch master at Debian QA / jenkins.debian.net
Commits:
8f02b0b1 by Holger Levsen at 2018-09-26T23:40:07Z
reproducible: refactoring
Signed-off-by: Holger Levsen <holger at layer-acht.org>
- - - - -
009c4cbd by Holger Levsen at 2018-09-26T23:47:17Z
reproducible Archlinux: whitespace improvement
Signed-off-by: Holger Levsen <holger at layer-acht.org>
- - - - -
72a6c362 by Holger Levsen at 2018-09-26T23:56:26Z
reproducible Debian: extend check_node_is_up() to check $NODE is not marked as offline and fixup function to actually abort the build if a node is detected as down
Signed-off-by: Holger Levsen <holger at layer-acht.org>
- - - - -
3 changed files:
- bin/reproducible_archlinux_scheduler.sh
- bin/reproducible_build.sh
- bin/reproducible_common.sh
Changes:
=====================================
bin/reproducible_archlinux_scheduler.sh
=====================================
@@ -219,14 +219,14 @@ update_archlinux_repositories() {
if [ $old -ne 0 ] && ( [ $new -ne 0 ] || [ $updated -ne 0 ] ) ; then
msg_old=", plus $old already tested ones"
elif [ $old -ne 0 ] ; then
- msg_old="$old already tested packages"
+ msg_old=" $old already tested packages"
else
msg_old=""
fi
if [ $depwait404 -ne 0 ] && ( [ $new -ne 0 ] || [ $updated -ne 0 ] || [ $old -ne 0 ] ) ; then
msg_depwait404=" and $depwait404 packages with unresolved dependencies or 404 problems"
elif [ $depwait404 -ne 0 ] ; then
- msg_depwait404="$depwait404 packages with unresolved dependencies or 404 problems"
+ msg_depwait404=" $depwait404 packages with unresolved dependencies or 404 problems"
else
msg_depwait404=""
fi
=====================================
bin/reproducible_build.sh
=====================================
@@ -309,14 +309,6 @@ handle_reproducible() {
fi
}
-unregister_build() {
- # unregister this build so it will immeditiatly tried again
- if [ -n "$SRCPKGID" ] ; then
- query_db "UPDATE schedule SET date_build_started = NULL, job = NULL WHERE package_id=$SRCPKGID"
- fi
- NOTIFY=""
-}
-
handle_env_changes() {
unregister_build
MESSAGE="$(date -u ) - ${BUILD_URL}console.log encountered a problem: $1"
@@ -696,14 +688,22 @@ EOF
}
check_node_is_up() {
- # this actually tests two things:
+ # this actually tests three things:
+ # - the node is not listed in ~/offline_nodes
# - ssh login works
# - /tmp is not mounted in read-only mode
local NODE=$1
local PORT=$2
local SLEEPTIME=$3
set +e
- echo "$(date -u) - checking if $NODE is up."
+ echo "$(date -u) - checking ~/offline_nodes if $NODE is marked as down."
+ if grep -q $NODE ~/offline_nodes >/dev/null 2>&1 ; then
+ echo "$(date -u) - $NODE seems to marked as down, sleeping ${SLEEPTIME}min before aborting this job."
+ unregister_build
+ sleep ${SLEEPTIME}.1337m
+ exit 0
+ fi
+ echo "$(date -u) - checking via ssh if $NODE is up."
ssh -o "BatchMode = yes" -p $PORT $NODE 'rm -v $(mktemp --tmpdir=/tmp read-only-fs-test-XXXXXX)'
RESULT=$?
# abort job if host is down
@@ -711,6 +711,7 @@ check_node_is_up() {
echo "$(date -u) - $NODE seems to be down, sleeping ${SLEEPTIME}min before aborting this job."
unregister_build
sleep ${SLEEPTIME}.1337m
+ exit 0
fi
set -e
}
=====================================
bin/reproducible_common.sh
=====================================
@@ -701,6 +701,14 @@ handle_race_condition() {
exit 0
}
+unregister_build() {
+ # unregister this build so it will immeditiatly tried again
+ if [ -n "$SRCPKGID" ] ; then
+ query_db "UPDATE schedule SET date_build_started = NULL, job = NULL WHERE package_id=$SRCPKGID"
+ fi
+ NOTIFY=""
+}
+
#
# create the png (and query the db to populate a csv file...)
#
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/compare/61ab3c29d3e76ad9d170137fc6b193c182eee602...72a6c362fce4229e9e3a53709255583d5526d4b8
--
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/compare/61ab3c29d3e76ad9d170137fc6b193c182eee602...72a6c362fce4229e9e3a53709255583d5526d4b8
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/20180926/25b4c504/attachment-0001.html>
More information about the Qa-jenkins-scm
mailing list