Commit 2342d281 authored by Jelmer Vernooij's avatar Jelmer Vernooij Committed by Holger Levsen
Browse files

Use sudo to create /srv/janitor.



Signed-off-by: Holger Levsen's avatarHolger Levsen <holger@layer-acht.org>
parent cdcb59f4
...@@ -12,9 +12,8 @@ JANITOR_REPO_URL=https://salsa.debian.org/jelmer/debian-janitor ...@@ -12,9 +12,8 @@ JANITOR_REPO_URL=https://salsa.debian.org/jelmer/debian-janitor
TARGET=/srv/janitor TARGET=/srv/janitor
if [ ! -d $TARGET ]; then sudo mkdir -p $TARGET/
mkdir $TARGET sudo chown -R jenkins:jenkins $TARGET/
fi
if [ ! -d $TARGET/debian-janitor ]; then if [ ! -d $TARGET/debian-janitor ]; then
git clone --recurse $JANITOR_REPO_URL $TARGET/debian-janitor git clone --recurse $JANITOR_REPO_URL $TARGET/debian-janitor
...@@ -30,9 +29,7 @@ make -C $TARGET/debian-janitor/dulwich ...@@ -30,9 +29,7 @@ make -C $TARGET/debian-janitor/dulwich
ARCH=amd64 ARCH=amd64
DISTRO=unstable DISTRO=unstable
if [ ! -d $TARGET/chroots ]; then mkdir -p $TARGET/chroots
mkdir $TARGET/chroots
fi
if [ -d $TARGET/chroots/janitor-$DISTRO-$ARCH ] ; then if [ -d $TARGET/chroots/janitor-$DISTRO-$ARCH ] ; then
output_echo "chroot for $DISTRO/$ARCH exists, good." output_echo "chroot for $DISTRO/$ARCH exists, good."
......
...@@ -37,10 +37,10 @@ jenkins ALL= \ ...@@ -37,10 +37,10 @@ jenkins ALL= \
/usr/bin/qemu-system-x86_64 *, \ /usr/bin/qemu-system-x86_64 *, \
/usr/bin/qemu-img *, \ /usr/bin/qemu-img *, \
/sbin/lvcreate *, /sbin/lvremove *, /sbin/lvdisplay *, \ /sbin/lvcreate *, /sbin/lvremove *, /sbin/lvdisplay *, \
/bin/mkdir -p /media/*, \ /bin/mkdir -p /media/*, /bin/mkdir -p /srv/janitor/*, \
/usr/bin/guestmount *, \ /usr/bin/guestmount *, \
/bin/cp -rv /media/*, \ /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/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 /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 *, \ 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 *, \
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment