[Qa-jenkins-scm] [Git][qa/jenkins.debian.net][master] reproducible Archlinux: fixup SQL
Holger Levsen
gitlab at salsa.debian.org
Mon Sep 24 18:05:41 BST 2018
Holger Levsen pushed to branch master at Debian QA / jenkins.debian.net
Commits:
7d7b3a2e by Holger Levsen at 2018-09-24T17:03:15Z
reproducible Archlinux: fixup SQL
Signed-off-by: Holger Levsen <holger at layer-acht.org>
- - - - -
3 changed files:
- TODO
- bin/reproducible_build_archlinux_pkg.sh
- bin/reproducible_html_archlinux.sh
Changes:
=====================================
TODO
=====================================
@@ -339,6 +339,7 @@ See link:https://jenkins.debian.net/userContent/about.html["about jenkins.debian
** create json
** debian uses a table removed_packages, should this be used here too?
** debian uses a table manual_scheduler to limit the amount of packages someone can schedule per day...
+** should breakages job look for archlinux breakages?
* fix build.sh:
** build2.log doesnt get deleted if build1 fails
=====================================
bin/reproducible_build_archlinux_pkg.sh
=====================================
@@ -44,7 +44,6 @@ update_pkg_in_db() {
local ARCHLINUX_PKG_PATH=$ARCHBASE/$REPOSITORY/$SRCPACKAGE
cd "$ARCHLINUX_PKG_PATH"
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)"
SUITE="archlinux_$REPOSITORY"
@@ -54,11 +53,13 @@ update_pkg_in_db() {
exit 1
fi
QUERY="INSERT into results (package_id, version, status, build_date, build_duration, node1, node2, job)
- VALUES ('${SRCPKGID}', '$BUILD_VERSION', '$BUILD_STATE', '$BUILD_DATE', '$BUILD_DURATION', 'pb3 or pb4', 'pb3 or pb4', 'unknown');"
+ VALUES ('${SRCPKGID}', '$BUILD_VERSION', '$BUILD_STATE', '$DATE', '$BUILD_DURATION', '$NODE1', '$NODE2', '$BUILD_URL')
+ ON CONFLICT (package_id)
+ DO UPDATE SET version='$BUILD_VERSION', status='$BUILD_STATE', build_date='$DATE_DATE', build_duration='$BUILD_DURATION', node1='$NODE1', node2='$NODE2', job='$BUILD_URL' WHERE results.package_id='$SRCPKGID'";
echo "$QUERY"
query_db "$QUERY"
QUERY="INSERT INTO stats_build (name, version, suite, architecture, status, build_date, build_duration, node1, node2, job)
- VALUES ('$SRCPACKAGE', '$VERSION', '$SUITE', '$ARCH', '$STATUS', '$DATE', '$DURATION', '$NODE1', '$NODE2', '$JOB');"
+ VALUES ('$SRCPACKAGE', '$BUILD_VERSION', '$SUITE', '$ARCH', '$BUILD_STATE', '$DATE', '$BUILD_DURATION', '$NODE1', '$NODE2', '$BUILD_URL');"
echo "$QUERY"
query_db "$QUERY"
# unmark build since it's properly finished
@@ -208,8 +209,7 @@ create_pkg_html() {
esac
fi
echo " </td>" >> $HTML_BUFFER
- local BUILD_DATE="$(date -u --date=@$(stat -c %Y $ARCHLINUX_PKG_PATH/build1.log) +'%F %R %Z')"
- echo " <td>$BUILD_DATE" >> $HTML_BUFFER
+ echo " <td>$DATE" >> $HTML_BUFFER
local DURATION=$(cat $ARCHLINUX_PKG_PATH/pkg.build_duration 2>/dev/null || true)
if [ -n "$DURATION" ]; then
local HOUR=$(echo "$DURATION/3600"|bc)
=====================================
bin/reproducible_html_archlinux.sh
=====================================
@@ -23,7 +23,6 @@ MEMBERS_404="0 1 2 3 4 5 6 7 8 9 A"
MEMBERS_FTBR="0 1 2"
HTML_BUFFER=$(mktemp -t archlinuxrb-html-XXXXXXXX)
HTML_REPOSTATS=$(mktemp -t archlinuxrb-html-XXXXXXXX)
-SIZE=""
ARCHLINUX_TOTAL=0
ARCHLINUX_TESTED=0
ARCHLINUX_NR_FTBFS=0
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/commit/7d7b3a2ea60f833998a8e220604993283aad4762
--
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/commit/7d7b3a2ea60f833998a8e220604993283aad4762
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/20180924/29ee760e/attachment-0001.html>
More information about the Qa-jenkins-scm
mailing list