Commit 0fdd3ed2 authored by Holger Levsen's avatar Holger Levsen

reproducible Archlinux scheduler: add temp. code to populate results table with known data

Signed-off-by: Holger Levsen's avatarHolger Levsen <holger@layer-acht.org>
parent cc7db6f7
......@@ -317,7 +317,7 @@ See link:https://jenkins.debian.net/userContent/about.html["about jenkins.debian
* maintenance job:
** check for archlinux schroot sessions which should not be there and delete them. complain if that fails.
* use db
* use db - see https://tests.reproducible-builds.org/reproducibledb.html
** extend scheduler.sh:
*** comparing versions is probably needed: if its not empty it must be higher (due to repo constraints), but it can be even higher than in the repo, because we build trunk
**** at first reschedule packages which never have been build (according to the db)
......@@ -326,7 +326,6 @@ See link:https://jenkins.debian.net/userContent/about.html["about jenkins.debian
*** fix irc notification
** make build.sh
*** write db
**** write temp script to populate results table with known data: pkg.state, pkg.build_date. stop builders and html job when running this
*** we share /var/log/jenkins/reproducible-race-conditions.log with debian, is that ok? (else fix maintenance job and handle_race_condition())
*** make build respect pacman exit code, see FIXME in _html_.sh
** html
......
......@@ -53,7 +53,7 @@ update_archlinux_repositories() {
#
#if [ $(date +'%H') -gt 21 ] ; then
#FIXME: the next lines actually disables this code block...
if [ $(date +'%H') -gt 25 ] ; then
#if [ $(date +'%H') -gt 25 ] ; then
REMOVED=0
REMOVE_LIST=""
for REPO in $ARCHLINUX_REPOS ; do
......@@ -69,6 +69,28 @@ update_archlinux_repositories() {
# from results
# from scheduled
# from sources
else
#
# temporary code to move archlinux results from fs to db
#
cd $BASE/archlinux/$REPO/$PKG
if [ -f pkg.build_duration ] && [ -f pkg.state ] && [ -f pkg.version ] ; then
BUILD_DURATION="$(cat pkg.build_duration)"
BUILD_DATE="$(find . -name pkg.build_duration -printf '%TY-%Tm-%Td %TH:%TM\n')"
BUILD_STATE=$(cat pkg.state)
BUILD_VERSION="$(cat pkg.version)"
PKGID=$(query_db "SELECT id FROM sources WHERE name='$PKG' AND suite='$SUITE' AND architecture='$ARCH';")
QUERY="INSERT into results (package_id, version, status, build_date, build_duration, node1, node2, job
('$PKG_ID', '$BUILD_VERSION', '$BUILD_STATE', '$BUILD_DATE', '$BUILD_DURATION', 'pb3 or pb4', 'pb3 or pb4', 'unknown');"
echo "$QUERY"
query_db "$QUERY"
rm pkg.build_duration pkg.state pkg.version
elif [ -f pkg.build_duration ] || [ -f pkg.state ] || [ -f pkg.version ] ; then
echo "$REPO/$PKG: one or more of pkg.build_duration, pkg.state and pkg.version does not exist, ignoring."
else
echo "$REPO/$PKG has been added to the db (or never been build), ignoring."
fi
cd -
fi
done
done
......@@ -77,7 +99,7 @@ update_archlinux_repositories() {
if [ $REMOVED -ne 0 ] ; then
irc_message archlinux-reproducible "$MESSAGE"
fi
fi
#fi
#
# schedule packages
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment