[Qa-jenkins-scm] [jenkins.debian.net] 03/04: sudo to jenkins-adm for accessing the generated .yaml files

Holger Levsen holger at moszumanska.debian.org
Sat Nov 14 13:23:58 UTC 2015


This is an automated email from the git hooks/post-receive script.

holger pushed a commit to branch master
in repository jenkins.debian.net.

commit 703124fc74c45c31da1fe830175040bd067c8a25
Author: Philip Hands <phil at hands.com>
Date:   Thu Nov 12 20:35:17 2015 +0100

    sudo to jenkins-adm for accessing the generated .yaml files
---
 update_jdn.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/update_jdn.sh b/update_jdn.sh
index a353c10..beea9b2 100755
--- a/update_jdn.sh
+++ b/update_jdn.sh
@@ -388,8 +388,8 @@ if [ "$HOSTNAME" = "jenkins" ] || [ "$HOSTNAME" = "jenkins-test-vm" ] ; then
 	for metaconfig in *.yaml.py ; do
 	# there are both python2 and python3 scripts here
 		./$metaconfig > $TMPFILE
-		if ! $(diff ${metaconfig%.py} $TMPFILE > /dev/null) ; then
-			cp $TMPFILE ${metaconfig%.py}
+		if ! sudo -u jenkins-adm cmp -s ${metaconfig%.py} - < $TMPFILE ; then
+			sudo -u jenkins-adm tee ${metaconfig%.py} > /dev/null < $TMPFILE
 		fi
 	done
 	rm -f $TMPFILE

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/qa/jenkins.debian.net.git



More information about the Qa-jenkins-scm mailing list