[Qa-jenkins-scm] [Git][qa/jenkins.debian.net][master] 3 commits: reproducible Debian live: remove artifacts sooner

Holger Levsen (@holger) gitlab at salsa.debian.org
Wed Apr 26 21:29:48 BST 2023



Holger Levsen pushed to branch master at Debian QA / jenkins.debian.net


Commits:
a5cd047b by Holger Levsen at 2023-04-26T22:19:52+02:00
reproducible Debian live: remove artifacts sooner

Signed-off-by: Holger Levsen <holger at layer-acht.org>

- - - - -
0047195a by Holger Levsen at 2023-04-26T22:20:50+02:00
jenkins-shell-monitor: ignore stretch directories

Signed-off-by: Holger Levsen <holger at layer-acht.org>

- - - - -
36efe8e2 by Holger Levsen at 2023-04-26T22:28:42+02:00
reproducible Debian live: use debian/live_build instead debian_live_build as path

Signed-off-by: Holger Levsen <holger at layer-acht.org>

- - - - -


5 changed files:

- bin/jenkins-shell-monitor.sh
- bin/reproducible_debian_live_build.sh
- bin/reproducible_debian_live_sync_result.sh
- bin/reproducible_maintenance.sh
- hosts/jenkins/etc/apache2/sites-available/jenkins.debian.net.conf


Changes:

=====================================
bin/jenkins-shell-monitor.sh
=====================================
@@ -18,7 +18,6 @@ WARNING_LEVEL['/var/lib/jenkins']=80
 WARNING_LEVEL['/var/lib/schroot']=50
 WARNING_LEVEL['/srv/schroots']=100
 WARNING_LEVEL['/srv/reproducible-results/rbuild-debian']=50
-WARNING_LEVEL['r-b-userContent../dbd*/stretch']=3
 WARNING_LEVEL['r-b-userContent../dbd*/buster']=5
 WARNING_LEVEL['r-b-userContent../dbd*/bullseye']=40
 WARNING_LEVEL['r-b-userContent../dbd*/bookworm']=60
@@ -84,7 +83,7 @@ main_loop() {
 					;;
 				"/var/lib/jenkins/userContent/reproducible")
 					DIR_PATH=/var/lib/jenkins/userContent/reproducible/debian
-					for i in stretch buster bullseye bookworm unstable experimental ; do
+					for i in buster bullseye bookworm unstable experimental ; do
 						VISIBLE_PATH="r-b-userContent../dbd*/$i"
 						DU=$(cd $DIR_PATH ; du -ch dbd*/$i  2>/dev/null | grep total | awk '{ print $1 }')
 						if [ -n "$(echo $DU | grep G)" ] && [ -n "${WARNING_LEVEL[$VISIBLE_PATH]}" ] && [ "${WARNING_LEVEL[$VISIBLE_PATH]}" -lt "$(echo $DU | cut -d 'G' -f1 | cut -d '.' -f1)" ] ; then


=====================================
bin/reproducible_debian_live_build.sh
=====================================
@@ -1,7 +1,7 @@
 #!/bin/bash
 # vim: set noexpandtab:
 
-# Copyright 2021-2022 Holger Levsen <holger at layer-acht.org>
+# Copyright 2021-2023 Holger Levsen <holger at layer-acht.org>
 # Copyright 2021-2022 Roland Clobus <rclobus at rclobus.nl>
 # released under the GPLv2
 
@@ -90,7 +90,7 @@ publish_results() {
 			;;
 		esac
 		output_echo "Triggering openqa.debian.net for live-build ${IMAGE_TIMESTAMP}_${SUITE}_${DESKTOP} checksum=${CHECKSUM} now."
-		schroot --directory ${RESULTSDIR} -c source:jenkins-reproducible-unstable-diffoscope -- openqa-cli api -X POST isos ISO=${DESKTOP}_${SUITE}_${IMAGE_TIMESTAMP}.iso DISTRI=debian VERSION=${SUITE}_${DESKTOP} FLAVOR=live-build ARCH=x86_64 BUILD=${IMAGE_TIMESTAMP}_${SUITE}_${DESKTOP} CHECKSUM=${CHECKSUM} TIMESTAMP=${IMAGE_TIMESTAMP} ISO_URL=https://tests.reproducible-builds.org/debian_live_build/artifacts/r00t-me/${ISONAME} --odn --apikey ${OPENQA_APIKEY} --apisecret ${OPENQA_APISECRET} ${OPENQA_EXTRA_OPTIONS} | tee out.json
+		schroot --directory ${RESULTSDIR} -c source:jenkins-reproducible-unstable-diffoscope -- openqa-cli api -X POST isos ISO=${DESKTOP}_${SUITE}_${IMAGE_TIMESTAMP}.iso DISTRI=debian VERSION=${SUITE}_${DESKTOP} FLAVOR=live-build ARCH=x86_64 BUILD=${IMAGE_TIMESTAMP}_${SUITE}_${DESKTOP} CHECKSUM=${CHECKSUM} TIMESTAMP=${IMAGE_TIMESTAMP} ISO_URL=https://tests.reproducible-builds.org/debian/live_build/artifacts/r00t-me/${ISONAME} --odn --apikey ${OPENQA_APIKEY} --apisecret ${OPENQA_APISECRET} ${OPENQA_EXTRA_OPTIONS} | tee out.json
 		jq .ids out.json | awk '$1 + 0 > 0 { print "- enjoy https://openqa.debian.net/tests/" ($1 + 0) }'
 		jq .scheduled_product_id out.json  | awk '$1 + 0 > 0 { print "- enjoy https://openqa.debian.net/admin/productlog?id=" ($1 + 0) }'
 		rm out.json


=====================================
bin/reproducible_debian_live_sync_result.sh
=====================================
@@ -15,7 +15,8 @@ set -u
 set -e
 set -o pipefail # see eg http://petereisentraut.blogspot.com/2010/11/pipefail.html
 
-PROJECT=debian_live_build
+PROJECT_NAME=debian_live_build
+PROJECT_PATH=debian/live_build
 NODE=osuosl3-amd64.debian.net
 RBUILDLOG=/dev/null
 
@@ -27,7 +28,7 @@ rsync_remote_results() {
     local origfile=$2
     local filename=$(basename "$3")
     echo "$(date -u) - Starting to sync $description to '$filename'."
-    cd "$BASE"/"$PROJECT"
+    cd "$BASE"/"$PROJECT_PATH"
     if [ "$description" == "ISOfile" ] ; then
         local EXTRADIR=artifacts/r00t-me/
         mkdir -p $EXTRADIR
@@ -48,7 +49,7 @@ rsync_remote_results() {
     else
         local EXTRADIR=""
     fi
-    local URL="${REPRODUCIBLE_URL}/${PROJECT}/$EXTRADIR${filename}"
+    local URL="${REPRODUCIBLE_URL}/${PROJECT_NAME}/$EXTRADIR${filename}"
     # Copy the new results from the build node to the web server node
     scp -p -o Batchmode=yes "$NODE":"$origfile" "$filename.tmp"
     chmod 755 "$filename.tmp"
@@ -63,7 +64,7 @@ delete_live_build_file() {
     local filetodelete=$2
     local filename=$(basename "$filetodelete")
     echo "$(date -u) - Delete $description: '$filename'."
-    cd "$BASE"/"$PROJECT"
+    cd "$BASE"/"$PROJECT_PATH"
     if [[ "$filename" != "$filetodelete" ]]; then
         echo "E: You provided a full path, ignoring for safety" >&2
         exit 1


=====================================
bin/reproducible_maintenance.sh
=====================================
@@ -753,7 +753,7 @@ if [ "$ARCH" != "i386" ] ; then
 	fi
 fi
 
-# remove artifacts older than a day
+# remove deabin ci builds artifacts older than a day
 echo "$(date -u) - Checking for artifacts older than a day."
 ARTIFACTS=$(find $DEBIAN_BASE/artifacts/r00t-me/* -maxdepth 1 -type d -mtime +1 -exec ls -lad {} \; 2>/dev/null|| true)
 if [ -n "$ARTIFACTS" ] ; then
@@ -764,12 +764,12 @@ if [ -n "$ARTIFACTS" ] ; then
 fi
 
 # remove artifacts from the debian live build jobs, older than a day
-echo "$(date -u) - Checking for artifacts from debian live build jobs, that are older than a day."
-ARTIFACTS=$(find $BASE/debian_live_build/artifacts/r00t-me/* -maxdepth 1 -type f -mtime +1 -exec ls -lad {} \; 2>/dev/null|| true)
+echo "$(date -u) - Checking for artifacts from debian live build jobs, that are older than half a day."
+ARTIFACTS=$(find $DEBIAN_BASE/live_build/artifacts/r00t-me/* -maxdepth 1 -type f -mtime +0.5 -exec ls -lad {} \; 2>/dev/null|| true)
 if [ -n "$ARTIFACTS" ] ; then
 	echo
 	echo "Removed old debian-live artifacts:"
-	find $BASE/debian_live_build/artifacts/r00t-me/* -maxdepth 1 -type f -mtime +1 -exec rm -rv --one-file-system {} \; || true
+	find $DEBIAN_BASE/live_build/artifacts/r00t-me/* -maxdepth 1 -type f -mtime +0.5 -exec rm -rv --one-file-system {} \; || true
 	echo
 fi
 


=====================================
hosts/jenkins/etc/apache2/sites-available/jenkins.debian.net.conf
=====================================
@@ -212,7 +212,7 @@ Use https-redirect www.diffoscope.org
 	Include reproduciblemap.conf
 
 	Use r-b-artifacts debian
-	Use r-b-artifacts debian_live_build
+	Use r-b-artifacts debian/live_build
 
 	# for watching service logfiles
 	ScriptAlias /cgi-bin /srv/jenkins/bin/cgi-bin



View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/-/compare/69c917c5889e2105a6396f7bfc7fd8e9d469037b...36efe8e2cad4fd213d7d43048e47c31a844533b1

-- 
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/-/compare/69c917c5889e2105a6396f7bfc7fd8e9d469037b...36efe8e2cad4fd213d7d43048e47c31a844533b1
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/20230426/3149fc2a/attachment-0001.htm>


More information about the Qa-jenkins-scm mailing list