Much better build server provisioning

Including selection of correct ndk architecture, caching and performance
improvements, better configurability, etc.
This commit is contained in:
Ciaran Gultnieks 2013-05-31 07:48:39 +01:00
parent 0985a6d4f4
commit cb16a63409
5 changed files with 124 additions and 53 deletions

View file

@ -7,7 +7,12 @@ script "setup-android-ndk" do
user node[:settings][:user]
cwd "/tmp"
code "
tar jxvf /vagrant/cache/android-ndk-r8e-linux-x64.tar.bz2
if [ `uname -m` == 'x86_64' ] ; then
SUFFIX = '_64'
else
SUFFIX = ''
fi
tar jxvf /vagrant/cache/android-ndk-r8e-linux-x86$SUFFIX.tar.bz2
mv android-ndk-r8e #{ndk_loc}
"
not_if do

View file

@ -37,10 +37,16 @@ end
user user
cwd "/tmp"
code "
#{sdk_loc}/tools/android update sdk --no-ui -a -t #{sdk} <<X
if [ -f /vagrant/cache/platforms/#{sdk}.tar.gz ] ; then
echo Installing from cache
tar -C #{sdk_loc}/platforms -z -x -f /vagrant/cache/platforms/#{sdk}.tar.gz
else
echo Installing via 'android'
#{sdk_loc}/tools/android update sdk --no-ui -a -t #{sdk} <<X
y
X
fi
"
not_if "test -d #{sdk_loc}/platforms/#{sdk}"
end
@ -54,10 +60,16 @@ end
user user
cwd "/tmp"
code "
#{sdk_loc}/tools/android update sdk --no-ui -a -t #{sdk} <<X
if [ -f /vagrant/cache/add-ons/#{sdk}.tar.gz ] ; then
echo Installing from cache
tar -C #{sdk_loc}/add-ons -z -x -f /vagrant/cache/add-ons/#{sdk}.tar.gz
else
echo Installing via 'android'
#{sdk_loc}/tools/android update sdk --no-ui -a -t #{sdk} <<X
y
X
fi
"
not_if "test -d #{sdk_loc}/add-ons/#{sdk}"