summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMattia Rizzolo <mattia@debian.org>2017-05-18 03:38:18 +0200
committerMattia Rizzolo <mattia@debian.org>2017-05-18 03:38:22 +0200
commitfb0f91ea2820a4dc311bd4dafc4977f947e45f2b (patch)
treea100394b73be6a7ce9f5a78308cb9b6c770db441
parentb2ba8b4046c7d5eab107bddaae0b37d81db894fd (diff)
downloadjenkins.debian.net-fb0f91ea2820a4dc311bd4dafc4977f947e45f2b.tar.xz
chroot-run: export JENKINS_EXPORT_DIR also inside the chroot (i.e. bypass sudo)
Signed-off-by: Mattia Rizzolo <mattia@debian.org>
-rwxr-xr-xbin/chroot-run.sh3
1 files changed, 3 insertions, 0 deletions
diff --git a/bin/chroot-run.sh b/bin/chroot-run.sh
index c26d3bb7..abf70f31 100755
--- a/bin/chroot-run.sh
+++ b/bin/chroot-run.sh
@@ -175,6 +175,9 @@ if [ -f debian/control ] ; then
fi
EOF
fi
+ if [ "$EXPORTS_RESULTS" = "true" ]; then
+ echo "export JENKINS_EXPORTS_DIR=\"$JENKINS_EXPORTS_DIR\"" >> $CHROOT_TARGET/tmp/chroot-testrun
+ fi
echo "$*" >> $CHROOT_TARGET/tmp/chroot-testrun
chmod +x $CHROOT_TARGET/tmp/chroot-testrun
sudo chroot $CHROOT_TARGET /tmp/chroot-testrun