summaryrefslogtreecommitdiff
path: root/vm-data
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2012-08-30 07:33:32 +0100
committerLars Wirzenius <liw@liw.fi>2012-08-30 07:33:32 +0100
commit0c28f26b9e907c5b27c346f4f14955dcc41f84bc (patch)
tree91c3974f94f3c580e541993bd372f8fc188abb29 /vm-data
parent43cecacf4ff064e43da904162e06a4beeedbb472 (diff)
downloadjenkinstool-0c28f26b9e907c5b27c346f4f14955dcc41f84bc.tar.gz
Refactor Jenkins plugin installation
Diffstat (limited to 'vm-data')
-rwxr-xr-xvm-data/jenkins.customize12
1 files changed, 7 insertions, 5 deletions
diff --git a/vm-data/jenkins.customize b/vm-data/jenkins.customize
index bf5eb6e..dc34e40 100755
--- a/vm-data/jenkins.customize
+++ b/vm-data/jenkins.customize
@@ -55,11 +55,13 @@ chroot "$rootdir" apt-get install -y --no-remove jenkins
umount "$rootdir/proc"
# Install the Bazaar and Git plugins for Jenkins.
-old="$(pwd)"
-cd "$rootdir/var/lib/jenkins/plugins"
-wget --no-check-certificate http://updates.jenkins-ci.org/latest/bazaar.hpi
-wget --no-check-certificate http://updates.jenkins-ci.org/latest/git.hpi
-cd "$old"
+chroot "$rootdir" install -d -o jenkins -g jenkins "/var/lib/jenkins/plugins"
+for plugin in bazaar git
+do
+ wget --no-check-certificate \
+ -O "$rootdir/var/lib/jenkins/plugins/$plugin.hpi" \
+ "http://updates.jenkins-ci.org/latest/$plugin.hpi"
+done
# Remove the policy-rc.d so that things do start when we boot into the system.
rm "$rootdir/usr/sbin/policy-rc.d"