FORUMS
Remove All Ads from XDA

[Guide] How-to Automate Your ROM Build Process Using Jenkins - Setup Nightlies

n/a posts
Thanks Meter: 0
 
By AndroidSlave, Guest on 2nd October 2013, 05:40 PM
Thread Closed Email Thread
3rd October 2013, 09:57 AM |#11  
sunny2303's Avatar
Senior Member
Flag Mumbai
Thanks Meter: 2,274
 
Donate to Me
More
This is what you call, "Taking it to next level"

:thumbup:

Sent from Asylum HQ
The Following User Says Thank You to sunny2303 For This Useful Post: [ View ] Gift sunny2303 Ad-Free
5th October 2013, 04:09 PM |#12  
azliazmi's Avatar
Senior Member
Thanks Meter: 164
 
Donate to Me
More
Absolutely awesome! I'm subscribed this fred, man!

Sent from my N7000 using cm10.2-Asyluminator by chasmodo
8th October 2013, 05:42 AM |#13  
dschense's Avatar
Senior Member
Thanks Meter: 140
 
More
with my new root - 16GB RAM - everything works like it should thread subscribed!

is there any way to make the build faster? yes, using ccache.. but are there some more ways to get everything out of the box ?
AndroidSlave
8th October 2013, 05:45 AM |#14  
Guest
Thanks Meter: 0
 
More
Quote:
Originally Posted by dschense

with my new root - 16GB RAM - everything works like it should thread subscribed!

is there any way to make the build faster? yes, using ccache.. but are there some more ways to get everything out of the box ?

What type of hard drive do you have?
How long do your Jenkins builds take to run?

The first run always fails (flaw in Jenkins) I need to add that to the guide.
The second run always takes extra long
The third run should be quicker...
My builds take about 30-45 minutes including repo sync everything

If you have a Solid State hard drive you can have builds going much quicker....
8th October 2013, 09:59 PM |#15  
dschense's Avatar
Senior Member
Thanks Meter: 140
 
More
Okay.. I have tried many ways of setting up environment with Jenkins for compiling for paranoid android. But I had no luck at all..

I am running everything on a Ubuntu 12.04 headless server.

I did everything for setting up environment with installing nessesary apps and stuff with user who has sudo rights.
Than I installed Jenkins and logged in to the Jenkins user with sudo su und from root to Jenkins with su Jenkins without pw.
Home of Jenkins is var/lib/jenkins.
I downloaded android sdk to Jenkins home and installed sdk over x11 ssh connection in var/lib/jenkins/android-sdk.
Installed java jdk 6u45 to opt/java/64/java installation

Jdk path is set in Jenkins settings for default.

Logged in to Jenkins Web. Setup security with new user, created freestyle project und created workings pace. Repo init to this directory and sync everything.

In the freestyle project shell with Repo sync command and. /rom-build.sh i9300 clean

#!/bin/bash
cd ~/
export PATH=~/bin:$PATH
export USE_CCACHE=1
cd ~/workspace/pa43-legacy-modded/
repo sync -j16
./rom-build.sh i9300 clean

Build is syncing and building.. But I get Damn error all the time..
Do I have to change permissions or is the setup of my environment not the right way?

Hope anybody can help me...

Kaaaaaaaaatsching... Tapatalked!
AndroidSlave
8th October 2013, 10:05 PM |#16  
Guest
Thanks Meter: 0
 
More
@dschense
I'm confused as to what your Jenkins shell command is...
Also are you calling another script within a script? Or do you have two separate Jenkins execute shells?
Does that question make sense?

Also if you went into that particular build directory logged in via su jenkins, can you compile it manually without error?

your setup should look like this:


is that what you have?

You should Not be calling another script from inside your jenkins script. that will cause issues. you need to do them incrementally in chronological order and do a new execute shell for each script.

Also the "./" command won't work inside a script, or in a jenkins command

so your "./rom-build.sh i9300 clean" should be a whole new execute shell
and instead of "./" you need to use the "source" command like I have above
AndroidSlave
8th October 2013, 10:39 PM |#17  
Guest
Thanks Meter: 0
 
More
Also can you post the link of your error? I know you PM'd Me maybe u can paste that here

Sent from my GT-N7000 using Tapatalk 2
9th October 2013, 03:08 PM |#18  
dschense's Avatar
Senior Member
Thanks Meter: 140
 
More
I think my biggest problem is how I can do a right shell script for building. If I build ParanoidAndroid from source manually I use the command. /rom-build.sh i9300... But I don't know exactly what commands to use for just using the shell window in Jenkins without using the script by ParanoidAndroid.. Any help?

Kaaaaaaaaatsching.... Tapatalked!
AndroidSlave
9th October 2013, 05:05 PM |#19  
Guest
Thanks Meter: 0
 
More
Quote:
Originally Posted by dschense

I think my biggest problem is how I can do a right shell script for building. If I build ParanoidAndroid from source manually I use the command. /rom-build.sh i9300... But I don't know exactly what commands to use for just using the shell window in Jenkins without using the script by ParanoidAndroid.. Any help?

Kaaaaaaaaatsching.... Tapatalked!

I'm trying to help but you don't respond to my questions.

Can you (1) post the PA build script and (2) post exactly what is in your execute shell

Sent from my GT-N7000 using Tapatalk 2
9th October 2013, 10:24 PM |#20  
dschense's Avatar
Senior Member
Thanks Meter: 140
 
More
I am at work atm.. I will post everything when I have a little more time.. Next week I have much free time to use for setting up everything at all.. But maybe I can post some things like the build script tomorrow after work.
BTW. Big big the for helping me!

EDIT:

This is the rom-build.sj script:

http://pastebin.com/UzFFKqYM

EDIT2:

Now everything is clean.. i fetched my repo stuff and finished syncing.
Job is also clean.. any help for how to do next ?



Kaaaaaaaaatsching... Tapatalked!
AndroidSlave
11th October 2013, 06:27 AM |#21  
Guest
Thanks Meter: 0
 
More
Quote:
Originally Posted by dschense

I am at work atm.. I will post everything when I have a little more time.. Next week I have much free time to use for setting up everything at all.. But maybe I can post some things like the build script tomorrow after work.
BTW. Big big the for helping me!

EDIT:

This is the rom-build.sj script:

http://pastebin.com/UzFFKqYM

EDIT2:

Now everything is clean.. i fetched my repo stuff and finished syncing.
Job is also clean.. any help for how to do next ?



Kaaaaaaaaatsching... Tapatalked!

I will look in the morning when I get to work. I'll get back to you asap.

Sent from my GT-N7000 using Tapatalk 2
Thread Closed Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes