Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Add basic init script for EC2 plugin


Note that each variable refers to one of the matrix axes, not an Android Emulator plugin property.

Running on Amazon EC2

Using the Amazon EC2 Plugin for Jenkins, you can automatically launch build slaves on demand.

Here is a basic "Init script" that can be used in conjunction with a Ubuntu-based EC2 image, such as those listed on In this case, a 64-bit version of Ubuntu 10.04 LTS was used (e.g. ami-631f2b17), with Java and Android being automatically installed and configured when the machine starts up.

No Format

# Add Java repository to package sources
sudo add-apt-repository "deb lucid partner"
sudo apt-get update

# Upgrade existing packages
sudo apt-get -y upgrade

# Mark the the "Distributor License for Java" as accepted
echo sun-java6-jdk shared/accepted-sun-dlj-v1-1 select true | sudo /usr/bin/debconf-set-selections

# Install the JDK and required x86 libraries
sudo apt-get install -y sun-java6-jdk ia32-libs

# Retrieve and extract Android SDK
tar -zxf android-sdk_r09-linux_x86.tgz
mv android-sdk-linux_x86/ /home/ubuntu/android

# Export environment variables and put Android tools on the path
export ANDROID_HOME=/home/ubuntu/android
export PATH=$PATH:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools

# Download and install the SDK tools and all available Android platforms
/home/ubuntu/android/tools/android update sdk -u -t platform,platform-tool,tool

# Done!

Build execution