[Qa-jenkins-scm] [Git][qa/jenkins.debian.net][master] 5 commits: node wrapper: remove the debug, which is messing up with scp

Mattia Rizzolo (@mattia) gitlab at salsa.debian.org
Fri Sep 2 11:09:45 BST 2022



Mattia Rizzolo pushed to branch master at Debian QA / jenkins.debian.net


Commits:
41fd4fd9 by Mattia Rizzolo at 2022-09-02T11:59:16+02:00
node wrapper: remove the debug, which is messing up with scp

Signed-off-by: Mattia Rizzolo <mattia at debian.org>

- - - - -
ee995b43 by Mattia Rizzolo at 2022-09-02T12:05:32+02:00
node wrapper: accept both scp -p and plain scp

Signed-off-by: Mattia Rizzolo <mattia at debian.org>

- - - - -
17547cc6 by Mattia Rizzolo at 2022-09-02T12:05:56+02:00
reproducible debian live: shellcheck

Signed-off-by: Mattia Rizzolo <mattia at debian.org>

- - - - -
43d61a2f by Mattia Rizzolo at 2022-09-02T12:06:11+02:00
reproducible debian live: use scp -p (again) when syncing results

Signed-off-by: Mattia Rizzolo <mattia at debian.org>

- - - - -
9e3d80df by Mattia Rizzolo at 2022-09-02T12:09:00+02:00
reproducible debian live: enable syncing of results

Signed-off-by: Mattia Rizzolo <mattia at debian.org>

- - - - -


3 changed files:

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


Changes:

=====================================
bin/jenkins_node_wrapper.sh
=====================================
@@ -60,11 +60,20 @@ shift
 
 if [[ "$*" = "/bin/true" ]] ; then
 	exec /bin/true ; croak "Exec failed";
-elif [ "$1" = scp ] && [ "$2" = -f ]; then
-	set -x
-	echo "Debug: $*"
-	echo "Debug: $@"
-	exec scp -f "$3"; croak "Exec failed";
+elif [ "$1" = scp ]; then
+	case "$#" in
+		3)
+			if [ "$2" = -f ]; then
+				exec scp -f "$3"; croak "Exec failed";
+			fi
+			;;
+		4)
+			if [ "$2" = -p ] && [ "$3" = -f ]; then
+				exec scp -p -f "$4"; croak "Exec failed";
+			fi
+			;;
+	esac
+	croak "Unknown scp command: $# $*"
 elif [[ "$*" = 'rm -v $(mktemp --tmpdir=/tmp read-only-fs-test-XXXXXX)' ]] ; then
 	exec rm -v $(mktemp --tmpdir=/tmp read-only-fs-test-XXXXXX) ; croak "Exec failed";
 elif [[ "$*" = "cleanup_nodes /srv/jenkins/bin/reproducible_slay.sh" ]] ; then


=====================================
bin/reproducible_debian_live_build.sh
=====================================
@@ -24,10 +24,10 @@ set -o pipefail # see eg http://petereisentraut.blogspot.com/2010/11/pipefail.ht
 publish_file() {
 	local DESCRIPTION=$1
 	local ORIGINAL_FILE=$2
-	local PUBLISHED_NAME=$(basename $3)
+	local PUBLISHED_NAME
+	PUBLISHED_NAME=$(basename "$3")
 
-	# Disabled for now...
-	#ssh jenkins at jenkins.debian.net ${DESCRIPTION} ${ORIGINAL_FILE} ${PUBLISHED_NAME}
+	ssh jenkins at jenkins.debian.net "${DESCRIPTION}" "${ORIGINAL_FILE}" "${PUBLISHED_NAME}"
 }
 
 cleanup() {


=====================================
bin/reproducible_debian_live_sync_result.sh
=====================================
@@ -21,11 +21,12 @@ NODE=osuosl173-amd64.debian.net
 rsync_remote_results() {
     local description=$1
     local origfile=$2
-    local filename=$(basename "$3")
+    local filename
+    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"
-    scp -o Batchmode=yes "$NODE":"$origfile" "$filename.tmp"
+    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}"
@@ -36,7 +37,8 @@ rsync_remote_results() {
 delete_live_build_file() {
     local description=$1
     local filetodelete=$2
-    local filename=$(basename "$filetodelete")
+    local filename
+    filename=$(basename "$filetodelete")
     echo "$(date -u) - Delete $description: '$filename'."
     cd "$BASE"/"$PROJECT"
     if [[ "$filename" != "$filetodelete" ]]; then



View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/-/compare/4fa4eccef28705118b49028690ba14970280bbd8...9e3d80df19466dd2f9552daef7add2d044b776f4

-- 
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/-/compare/4fa4eccef28705118b49028690ba14970280bbd8...9e3d80df19466dd2f9552daef7add2d044b776f4
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/20220902/b0c0325c/attachment-0001.htm>


More information about the Qa-jenkins-scm mailing list