[Qa-jenkins-scm] [Git][qa/jenkins.debian.net][master] Use sudo to create /srv/janitor.
Holger Levsen
gitlab at salsa.debian.org
Sun May 17 18:16:22 BST 2020
Holger Levsen pushed to branch master at Debian QA / jenkins.debian.net
Commits:
2342d281 by Jelmer Vernooij at 2020-05-17T19:15:48+02:00
Use sudo to create /srv/janitor.
Signed-off-by: Holger Levsen <holger at layer-acht.org>
- - - - -
2 changed files:
- bin/janitor_setup_worker.sh
- hosts/common/etc/sudoers.d/jenkins
Changes:
=====================================
bin/janitor_setup_worker.sh
=====================================
@@ -12,9 +12,8 @@ JANITOR_REPO_URL=https://salsa.debian.org/jelmer/debian-janitor
TARGET=/srv/janitor
-if [ ! -d $TARGET ]; then
- mkdir $TARGET
-fi
+sudo mkdir -p $TARGET/
+sudo chown -R jenkins:jenkins $TARGET/
if [ ! -d $TARGET/debian-janitor ]; then
git clone --recurse $JANITOR_REPO_URL $TARGET/debian-janitor
@@ -30,9 +29,7 @@ make -C $TARGET/debian-janitor/dulwich
ARCH=amd64
DISTRO=unstable
-if [ ! -d $TARGET/chroots ]; then
- mkdir $TARGET/chroots
-fi
+mkdir -p $TARGET/chroots
if [ -d $TARGET/chroots/janitor-$DISTRO-$ARCH ] ; then
output_echo "chroot for $DISTRO/$ARCH exists, good."
=====================================
hosts/common/etc/sudoers.d/jenkins
=====================================
@@ -37,10 +37,10 @@ jenkins ALL= \
/usr/bin/qemu-system-x86_64 *, \
/usr/bin/qemu-img *, \
/sbin/lvcreate *, /sbin/lvremove *, /sbin/lvdisplay *, \
- /bin/mkdir -p /media/*, \
+ /bin/mkdir -p /media/*, /bin/mkdir -p /srv/janitor/*, \
/usr/bin/guestmount *, \
/bin/cp -rv /media/*, \
- /bin/chown -R jenkins\:jenkins /var/lib/jenkins/jobs/*,\
+ /bin/chown -R jenkins\:jenkins /var/lib/jenkins/jobs/*, /bin/chown -R jenkins\:jenkins /srv/janitor/*, \
SETENV: NOPASSWD: /usr/sbin/pbuilder *, \
SETENV: NOPASSWD: /usr/bin/timeout -k ??.?h ??h /usr/bin/ionice -c 3 /usr/bin/nice /usr/sbin/pbuilder *, \
SETENV: NOPASSWD: /usr/bin/timeout -k ??.?h ??h /usr/bin/ionice -c 3 /usr/bin/nice -n 11 /usr/bin/unshare --uts -- /usr/sbin/pbuilder *, \
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/-/commit/2342d281c4196147a94bf964e3469633e3da0c39
--
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/-/commit/2342d281c4196147a94bf964e3469633e3da0c39
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/20200517/b39c7979/attachment-0001.html>
More information about the Qa-jenkins-scm
mailing list