Update dists mirror in separate job; run dose-builddebcheck
authorChristoph Berg <myon@debian.org>
Sun, 17 Jan 2016 09:01:52 +0000 (10:01 +0100)
committerChristoph Berg <myon@debian.org>
Sun, 17 Jan 2016 09:01:52 +0000 (10:01 +0100)
jenkins/debcheck-pgapt
jenkins/pgapt-jobs.yaml

index c9a1af52f119776da5f69e51162190da319dc001..a715801b3e367f3bcb5961586814981071bcb384 100755 (executable)
@@ -3,6 +3,7 @@
 set -eu
 
 LISTSDIR="/home/chroot/$distribution-$architecture/var/lib/apt/lists"
+DISTSDIR="/home/jenkins/dists"
 
 case $stage in
        production) DIST="$distribution-pgdg" ;;
@@ -13,22 +14,40 @@ esac
 # include universe on ubuntu
 for FILE in $LISTSDIR/*_dists_${distribution}_universe_binary-${architecture}_Packages ; do
        [ -f "$FILE" ] || continue
-       EXTRABG="--bg $FILE"
+       # work around dose-debcheck dying on a Python_ field
+       TMPPKG=$(mktemp ${distribution}_universe_binary-${architecture}_Packages.XXXXXX)
+       trap "rm -f $TMPPKG" 0 2 3 15
+       sed -e 's/^Python_/Python-/' $FILE > $TMPPKG
+       EXTRABG="--bg $TMPPKG"
 done
 
-# include N.N components on sid
+# include latest N.N components on sid
 case $distribution in
-       sid) EXTRAFG="--fg $DIST/*.*/binary-${architecture}/Packages" ;;
+       sid) for C in $DISTSDIR/$DIST/?.?; do
+               EXTRAFG="--fg $C/binary-${architecture}/Packages"
+       done
+       ;;
 esac
 
+DEBCHECK="echo dose-debcheck -v -f -e ${EXTRABG:-} --bg $LISTSDIR/*_dists_${distribution}_main_binary-${architecture}_Packages"
+
 set -x
 
-# fetch packages lists
-rsync -Pav --delete atalia.postgresql.org:/srv/apt/pub/repos/apt/dists/$DIST .
+# run debcheck on main
+$DEBCHECK ${EXTRAFG:-} \
+       --fg $DISTSDIR/$DIST/main/binary-${architecture}/Packages \
+       || EXIT=$?
+
+# run debcheck on N.N components
+$DEBCHECK \
+       --fg $DISTSDIR/$DIST/?.?/binary-${architecture}/Packages \
+       || EXIT=$?
+
+# run builddebcheck
+dose-builddebcheck -v -f -e --deb-native-arch=$architecture \
+       $LISTSDIR/*_dists_${distribution}_main_binary-${architecture}_Packages \
+       $DISTSDIR/$DIST/main/binary-${architecture}/Packages \
+       $DISTSDIR/$DIST/main/source/Sources.gz \
+       || EXIT=$?
 
-# run debcheck
-dose-debcheck -v -f -e \
-       --bg $LISTSDIR/*_dists_${distribution}_main_binary-${architecture}_Packages \
-       ${EXTRABG:-} \
-       --fg $DIST/main/binary-${architecture}/Packages \
-       ${EXTRAFG:-}
+exit ${EXIT:-0}
index ccc83eaf155ca79776e75be3a4867f79c0571654..39ecebb0fc915d0f7dd0a0871d211f201b5e0ac8 100644 (file)
                 - ircbot:
                         matrix-notifier: all
 
+- job:
+        name: 'debcheck-distsmirror'
+        description: 'Sync apt.pg.org dists/ directory and trigger debcheck'
+        triggers:
+                - timed: "H H * * *"
+        builders:
+                - shell: |
+                        rsync -Pav --delete atalia.postgresql.org:/srv/apt/pub/repos/apt/dists/ /home/jenkins/dists
+        publishers:
+                - trigger:
+                        project: debcheck
+                - ircbot:
+                        strategy: any-failure
+                        message-type: summary
+
 - job:
         name: 'debcheck'
         description: 'Run dose-debcheck on all distributions'
         project-type: matrix
-        #execution-strategy:
-        #        sequential: true
-        #        touchstone:
-        #                expr: '(distribution=="sid") && (architecture=="amd64")'
+        child-workspace: .
+        execution-strategy:
+                sequential: true
         axes:
                 - axis: *dist_axis
                 - axis: *arch_axis
                                 - production
                                 - testing
 
-        #triggers:
-        #        - timed: "H */6 * * *"
         builders:
                 - shell: 'debcheck-pgapt'
         #publishers: