[Qa-jenkins-scm] [Git][qa/jenkins.debian.net][master] reproducible Debian live: publish iso files to t.r-b.o/debian_live_build/artifacts/r00t-me/

Holger Levsen (@holger) gitlab at salsa.debian.org
Fri Sep 16 23:06:14 BST 2022



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


Commits:
fa81aee5 by Holger Levsen at 2022-09-17T00:05:55+02:00
reproducible Debian live: publish iso files to t.r-b.o/debian_live_build/artifacts/r00t-me/

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

- - - - -


2 changed files:

- bin/reproducible_debian_live_build.sh
- bin/reproducible_debian_live_sync_result.sh


Changes:

=====================================
bin/reproducible_debian_live_build.sh
=====================================
@@ -51,7 +51,7 @@ publish_file() {
 }
 
 prepare_publishing() {
-	# Remotely remove previously published files if they don't exist locally
+	# Remotely remove previously published files once if they don't exist locally
 	[ ! -f ${DESKTOP}-${SUITE}.iso ] || publish_file delete ISOfile ${DESKTOP}-${SUITE}.iso
 	[ ! -f ${DESKTOP}-${SUITE}-summary.txt ] || publish_file delete Summary ${DESKTOP}-${SUITE}-summary.txt
 	[ ! -f ${DESKTOP}-${SUITE}.html ] || publish_file delete DiffoscopeOutput ${DESKTOP}-${SUITE}.html
@@ -62,7 +62,7 @@ publish_results() {
 	local RESULT=$1
 	output_echo "Publishing results: ${RESULT}"
 
-	# remote cleanup files if they don't exist locally
+	# cleanup files remotely if they don't exist locally
 	prepare_publishing
 
 	if [ "${RESULT}" == "success" ]; then
@@ -80,14 +80,14 @@ publish_results() {
 		case ${DESKTOP} in
 		"smallest-build")
 			# No DESKTOP=xxx setting, LIVE_INSTALLER=no
-			$OPEN_QA_CLI api -X POST isos ISO=${DESKTOP}_${SUITE}_${TIMESTAMP}.iso DISTRI=debian VERSION=${SUITE}_${DESKTOP} FLAVOR=live-build ARCH=x86_64 BUILD=:${SNAPSHOT_TIMESTAMP}_${SUITE}_${DESKTOP} CHECKSUM=${CHECKSUM} TIMESTAMP=${SNAPSHOT_TIMESTAMP} ISO_URL=https://tests.reproducible-builds.org/debian_live_build/${ISONAME} --odn --apikey ${OPENQA_APIKEY} --apisecret ${OPENQA_APISECRET} LIVE_INSTALLER=no
+			$OPEN_QA_CLI api -X POST isos ISO=${DESKTOP}_${SUITE}_${TIMESTAMP}.iso DISTRI=debian VERSION=${SUITE}_${DESKTOP} FLAVOR=live-build ARCH=x86_64 BUILD=:${SNAPSHOT_TIMESTAMP}_${SUITE}_${DESKTOP} CHECKSUM=${CHECKSUM} TIMESTAMP=${SNAPSHOT_TIMESTAMP} ISO_URL=https://tests.reproducible-builds.org/debian_live_build/artifacts/r00t-me/${ISONAME} --odn --apikey ${OPENQA_APIKEY} --apisecret ${OPENQA_APISECRET} LIVE_INSTALLER=no
 			;;
 		"standard")
 			# No DESKTOP=xxx setting
-			$OPEN_QA_CLI api -X POST isos ISO=${DESKTOP}_${SUITE}_${TIMESTAMP}.iso DISTRI=debian VERSION=${SUITE}_${DESKTOP} FLAVOR=live-build ARCH=x86_64 BUILD=:${SNAPSHOT_TIMESTAMP}_${SUITE}_${DESKTOP} CHECKSUM=${CHECKSUM} TIMESTAMP=${SNAPSHOT_TIMESTAMP} ISO_URL=https://tests.reproducible-builds.org/debian_live_build/${ISONAME} --odn --apikey ${OPENQA_APIKEY} --apisecret ${OPENQA_APISECRET}
+			$OPEN_QA_CLI api -X POST isos ISO=${DESKTOP}_${SUITE}_${TIMESTAMP}.iso DISTRI=debian VERSION=${SUITE}_${DESKTOP} FLAVOR=live-build ARCH=x86_64 BUILD=:${SNAPSHOT_TIMESTAMP}_${SUITE}_${DESKTOP} CHECKSUM=${CHECKSUM} TIMESTAMP=${SNAPSHOT_TIMESTAMP} ISO_URL=https://tests.reproducible-builds.org/debian_live_build/artifacts/r00t-me/${ISONAME} --odn --apikey ${OPENQA_APIKEY} --apisecret ${OPENQA_APISECRET}
 			;;
 		*)
-			$OPEN_QA_CLI api -X POST isos ISO=${DESKTOP}_${SUITE}_${TIMESTAMP}.iso DISTRI=debian VERSION=${SUITE}_${DESKTOP} FLAVOR=live-build ARCH=x86_64 BUILD=:${SNAPSHOT_TIMESTAMP}_${SUITE}_${DESKTOP} CHECKSUM=${CHECKSUM} TIMESTAMP=${SNAPSHOT_TIMESTAMP} ISO_URL=https://tests.reproducible-builds.org/debian_live_build/${ISONAME} --odn --apikey ${OPENQA_APIKEY} --apisecret ${OPENQA_APISECRET} DESKTOP=${DESKTOP}
+			$OPEN_QA_CLI api -X POST isos ISO=${DESKTOP}_${SUITE}_${TIMESTAMP}.iso DISTRI=debian VERSION=${SUITE}_${DESKTOP} FLAVOR=live-build ARCH=x86_64 BUILD=:${SNAPSHOT_TIMESTAMP}_${SUITE}_${DESKTOP} CHECKSUM=${CHECKSUM} TIMESTAMP=${SNAPSHOT_TIMESTAMP} ISO_URL=https://tests.reproducible-builds.org/debian_live_build/artifacts/r00t-me/${ISONAME} --odn --apikey ${OPENQA_APIKEY} --apisecret ${OPENQA_APISECRET} DESKTOP=${DESKTOP}
 			;;
 		esac
 	else


=====================================
bin/reproducible_debian_live_sync_result.sh
=====================================
@@ -26,12 +26,20 @@ rsync_remote_results() {
     local origfile=$2
     local filename=$(basename "$3")
     echo "$(date -u) - Starting to sync $description to '$filename'."
-    # Copy the new results from the build node to the web server node
     cd "$BASE"/"$PROJECT"
+    if [ "$description" == "ISOfile" ] ; then
+        local EXTRADIR=artifacts/r00t-me/
+        mkdir -p $EXTRADIR
+        cd $EXTRADIR
+    else
+        local EXTRADIR=""
+    fi
+    local URL="${REPRODUCIBLE_URL}/${PROJECT}/$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"
     mv "$filename.tmp" "$filename"
-    echo "$(date -u) - enjoy ${REPRODUCIBLE_URL}/${PROJECT}/${filename}"
+    echo "$(date -u) - enjoy $URL"
 }
 
 # Argument 1 = description
@@ -46,6 +54,11 @@ delete_live_build_file() {
         echo "E: You provided a full path, ignoring for safety" >&2
         exit 1
     fi
+    if [ "$description" == "ISOfile" ] ; then
+        local EXTRADIR=artifacts/r00t-me/
+        mkdir -p $EXTRADIR
+        cd $EXTRADIR
+    fi
     if [ -f "$filename" ]; then
         rm -vf "$filename"
 	# also delete .tmp file if it exists



View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/-/commit/fa81aee5204a51a3b34bf3c40414639fc3751faa

-- 
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/-/commit/fa81aee5204a51a3b34bf3c40414639fc3751faa
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/20220916/a39be6ba/attachment-0001.htm>


More information about the Qa-jenkins-scm mailing list