[Qa-jenkins-scm] [Git][qa/jenkins.debian.net][master] Move old artifact cleanup to before the results html stub is generated

Holger Levsen gitlab at salsa.debian.org
Sun Jun 10 15:40:49 BST 2018


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


Commits:
b1f7c51d by Eli Schwartz at 2018-06-10T14:40:27+00:00
Move old artifact cleanup to before the results html stub is generated

Otherwise we always list the just-now-deleted artifacts on the main
results page, but the links will 404.

- - - - -


1 changed file:

- bin/reproducible_html_archlinux.sh


Changes:

=====================================
bin/reproducible_html_archlinux.sh
=====================================
--- a/bin/reproducible_html_archlinux.sh
+++ b/bin/reproducible_html_archlinux.sh
@@ -24,6 +24,16 @@ create_pkg_state_and_html() {
 		return
 	fi
 
+	# clear files from previous builds
+	pushd "$ARCHLINUX_PKG_PATH"
+	for file in build1.log build2.log build1.version build2.version *BUILDINFO.txt *.html; do
+		if [ -f $file ] && [ pkg.build_duration -nt $file ] ; then
+			rm $file
+			echo "$ARCHLINUX_PKG_PATH/$file older than $ARCHLINUX_PKG_PATH/pkg.build_duration, thus deleting it."
+		fi
+	done
+	popd
+
 	if [ -f $ARCHLINUX_PKG_PATH/pkg.version ] ; then
 		VERSION=$(cat $ARCHLINUX_PKG_PATH/pkg.version)
 	elif [ -f $ARCHLINUX_PKG_PATH/build1.version ] ; then
@@ -200,16 +210,6 @@ create_pkg_state_and_html() {
 	echo "     </tr>" >> $HTML_BUFFER
 	mv $HTML_BUFFER $ARCHLINUX_PKG_PATH/pkg.html
 	chmod 644 $ARCHLINUX_PKG_PATH/pkg.html
-
-	# clear files from previous builds
-	pushd "$ARCHLINUX_PKG_PATH"
-	for file in build1.log build2.log build1.version build2.version *BUILDINFO.txt *.html; do
-		if [ -f $file ] && [ pkg.build_duration -nt $file ] ; then
-			rm $file
-			echo "$ARCHLINUX_PKG_PATH/$file older than $ARCHLINUX_PKG_PATH/pkg.build_duration, thus deleting it."
-		fi
-	done
-	popd
 }
 
 #



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

-- 
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/commit/b1f7c51ddc364915bde73417bd15db9878488fcd
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/20180610/5111aa65/attachment-0001.html>


More information about the Qa-jenkins-scm mailing list