[Qa-jenkins-scm] [Git][qa/jenkins.debian.net][master] Actually propagate BUILD_URL, drop unused environment variables.

Mattia Rizzolo (@mattia) gitlab at salsa.debian.org
Wed Feb 16 19:32:07 GMT 2022



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


Commits:
dc8c16f1 by Jelmer Vernooij at 2022-02-16T19:22:42+00:00
Actually propagate BUILD_URL, drop unused environment variables.

- - - - -


3 changed files:

- bin/janitor_worker.sh
- bin/jenkins_master_wrapper.sh
- bin/jenkins_node_wrapper.sh


Changes:

=====================================
bin/janitor_worker.sh
=====================================
@@ -6,11 +6,7 @@ docker run --rm --cap-add=SYS_ADMIN --privileged \
 	--memory=20g \
 	-v /srv/janitor:/srv/janitor \
 	-e BUILD_URL="${BUILD_URL}" \
-	-e EXECUTOR_NUMBER="${EXECUTOR_NUMBER}" \
-	-e BUILD_ID="${BUILD_ID}" \
-	-e BUILD_NUMBER="${BUILD_NUMBER}" \
 	-e NODE_NAME="${NODE_NAME}" \
-	-e JENKINS_URL="${JENKINS_URL}" \
 	registry.salsa.debian.org/jelmer/janitor.debian.net/worker \
 	--listen-address=0.0.0.0 \
 	--port=8080 \


=====================================
bin/jenkins_master_wrapper.sh
=====================================
@@ -38,6 +38,10 @@ case $JOB_NAME in
 		# the BUILD_TAG and BUILD_URL are re-exported on the nodes then
 		PARAMS+=("$BUILD_TAG" "$BUILD_URL" "$@")
 		;;
+	janitor-worker)
+		# the BUILD_URL is re-exported on the nodes then
+		PARAMS+=("$BUILD_URL" "$NODE_NAME" "$@")
+		;;
 	cleanup_nodes)
 		# pseudo job used to cleanup nodes
 		PARAMS+=("$@")


=====================================
bin/jenkins_node_wrapper.sh
=====================================
@@ -86,7 +86,9 @@ elif [ "$1" = "reproducible_html_builtin-pho" ] ; then
 elif [ "$1" = "janitor-setup-worker" ] ; then
 	shift ; exec /srv/jenkins/bin/janitor_setup_worker.sh ; croak "Exec failed";
 elif [ "$1" = "janitor-worker" ] ; then
-	shift ; exec /srv/jenkins/bin/janitor_worker.sh ; croak "Exec failed";
+	export BUILD_URL="$2"
+	export NODE_NAME="$3"
+	shift 3; exec /srv/jenkins/bin/janitor_worker.sh ; croak "Exec failed";
 elif [ "$1" = "fakeroot-foreign-worker" ] ; then
 	shift ; exec /srv/jenkins/bin/fakeroot_foreign_worker.sh ; croak "Exec failed";
 elif [ "$1" = "haskell-package-plan" ] ; then



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

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


More information about the Qa-jenkins-scm mailing list