From 0c28f26b9e907c5b27c346f4f14955dcc41f84bc Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Thu, 30 Aug 2012 07:33:32 +0100 Subject: Refactor Jenkins plugin installation --- vm-data/jenkins.customize | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'vm-data') 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" -- cgit v1.2.1