QVDev Blog

profile for QVDev on Stack Exchange, a network of free, community-driven Q&A sites
Continuous integration with Jenkins


Recently I looked into continuous integration for Android applications, that I hosted on Github. After some research cloudbees.com caught my interest. Here I will shortly describe how to set this up in about 15 minutes.

Prerequisite: Cloudbees account. Also posible to use youre google account.
Github account with a public repository. Private is posible too, but will discus later.

Step one:
Setup your cloubees account and go to builds.

Step two:
Enter a job name and select “Build a free-style software project” and hit OK.

Step three:
Fill in the following:

At Source Code Management choose Git and enter you’re repository.
for example:

git://github.com/username/repository.git

At Build do the following:
Add build step and choose Execute shell.
Enter the following in the box:

#generate the local.properties file
    rm -f local.properties
    $ANDROID_HOME/tools/android update project --path ./

Then add another build step but this time choose:
Invoke Ant and enter the preferred ant builds. For now just type:

clean debug

Now on the right choose advanced and setup the build.xml file. Normally this is in the root of the project so enter there:

build.xml


//Side note If you have not configured your Android project for Ant build see the following website how to setup your project for ANT.
http://www.androidengineer.com/2010/06/using-ant-to-automate-building-android.html

Final step:
Then presse Apply and Save. This will bring you back to you’re job. Now all you have to do is choose build now and you are done! Take a QR code When the build is successful you can find back the debug .APK that Jenkins has generated, go to workspace and choose bin. project.APK.

comments powered by Disqus
Back Home
Web Analytics