Created
May 27, 2011 01:07
-
-
Save hayeshaugen/994453 to your computer and use it in GitHub Desktop.
Android SDK headless install for Linux Jenkins CI
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# sudo su - | |
# apt-get install openjdk-6-jdk | |
# apt-get install ant1.8 | |
Source control, in this case svn: | |
# apt-get install subversion | |
Install Jenkins | |
# wget -q -O - http://pkg.jenkins-ci.org/debian/jenkins-ci.org.key | sudo apt-key add - | |
# echo "deb http://pkg.jenkins-ci.org/debian binary/" > /etc/apt/sources.list.d/jenkins.list | |
# aptitude update | |
# aptitude install jenkins | |
Android sdk | |
# mkdir /android | |
# cd /android | |
# wget http://dl.google.com/android/android-sdk_r16-linux.tgz | |
# tar xzvf android-sdk_r16-linux.tgz | |
[make sure jenkins has permissions for this directory] | |
[edit path in etc/bash.bashrc to include /android/android-sdk-linux/tools] | |
# /android/android-sdk-linux/tools/android update sdk --no-ui | |
[this will download all supported sdks which is probably overkill even for a build machine] | |
[to limit which sdks get downloaded use a filter as explained by help: android -h update] | |
Grab the project | |
# svn co http://server/path | |
maybe update projects | |
# android update project -p [path to project] |
I'd suggest using /opt
path as it is meaningfull to do it like that, and permissions setting depends on what will be using android sdk. Using android:android
for sdk folder, adding jenkins to android group
and adding tools
and platform-tools
to PATH
only in android
user, not to pollute global PATH or bring security risk
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Having an
android
group and adding the jenkins user to it, is a reasonably simple way to sort out permission issues. Perhaps better to have android sdk installed to/usr/local/share/
but that's just my preference.