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

Status
Not open for further replies.
Search This thread

tigger2014

Senior Member
Nov 23, 2012
136
123
London
I'm not sure what's going on with your guys' build. There are some settings to modify the working directory. I have never built PA.

I wish I could give more guidance... I feel like it has to do with that the script tries to move the ota file thinking its in the main directory when its in the working directory
@beerbong can you provide any guidance here?


would the working dir be under jenkins/workspace then the build name?
 
A

AndroidSlave

Guest
would the working dir be under jenkins/workspace then the build name?

you may want to take a look at this:
http://jenkins-ci.361315.n4.nabble.com/Changing-default-workspace-location-td3620027.html

there are some suggestions in there, including making a symlink ("ln -s")

my only concern is that the workspace is dynamic...

Why does PA have to rm -f the OTA maybe that can be removed from the makefile
also, it may be helpful to contact the PA team and ask how they overcome this hurdle with their official nightlies
this would be a good addition to the guide too for helping others
 
Last edited:

Lynkz83

Member
Feb 26, 2010
37
5
Wichita Falls
you may want to take a look at this:
http://jenkins-ci.361315.n4.nabble.com/Changing-default-workspace-location-td3620027.html

there are some suggestions in there, including making a symlink ("ln -s")

my only concern is that the workspace is dynamic...

Why does PA have to rm -f the OTA maybe that can be removed from the makefile
also, it may be helpful to contact the PA team and ask how they overcome this hurdle with their official nightlies
this would be a good addition to the guide too for helping others

it seems i also get the same error as above

Code:
/home/lynkz83/dirtyunicorns/out/target/product/jflteusc/du_jflteusc-ota-eng.jenkins.zip doesn't exist!
make: *** [bacon] Error 1
Build step 'Execute shell' marked build as failure
Finished: FAILURE

This is from my execute shell build step, i set jenkins up before seeing this guide, but its different from above setup but it works, til i get to above error,

Code:
#!/bin/bash
cd /home/lynkz83/dirtyunicorns
. build/envsetup.sh
brunch jflteusc
 
A

AndroidSlave

Guest
it seems i also get the same error as above

Code:
/home/lynkz83/dirtyunicorns/out/target/product/jflteusc/du_jflteusc-ota-eng.jenkins.zip doesn't exist!
make: *** [bacon] Error 1
Build step 'Execute shell' marked build as failure
Finished: FAILURE

This is from my execute shell build step, i set jenkins up before seeing this guide, but its different from above setup but it works, til i get to above error,

Code:
#!/bin/bash
cd /home/lynkz83/dirtyunicorns
. build/envsetup.sh
brunch jflteusc

Have you tried building in /var/lib/jenkins?

I think your issue is a little different. Also you don't have it setup per this guide at all... So its hard to begin troubleshooting.

You are supposed to repo init when logged in as jenkins and repo init in jenkins home dir, not your user acct dir
 

Lynkz83

Member
Feb 26, 2010
37
5
Wichita Falls
Have you tried building in /var/lib/jenkins?

I think your issue is a little different. Also you don't have it setup per this guide at all... So its hard to begin troubleshooting.

You are supposed to repo init when logged in as jenkins and repo init in jenkins home dir, not your user acct dir

no jenkin's has been an afterthought so ill have to go back and setup via this guide, i was hoping to build as it was, but i can go back and setup via this guide and see if i come across the same problem, the team that my source is coming from is redoing their branches so im hoping that i can get away with just copying my working directory over and then repo init
 

Astrali

Senior Member
Jun 14, 2013
95
21
Okay mate, this is the log of my last build....

http://www.file-upload.net/download-8168867/log.html

everything seems to be good till the end:

error:

Code:
Running releasetool
/var/lib/jenkins/pa43-modded/out/target/product/i9300/pa_i9300-ota-eng.jenkins.zip doesn't exist!
make: *** [/var/lib/jenkins/pa43-modded/out/target/product/i9300/pa_i9300-ota-8.zip] Error 1
make: *** Deleting file `/var/lib/jenkins/pa43-modded/out/target/product/i9300/pa_i9300-ota-8.zip'


EDIT:

This is my rom-build.sh --- path: /var/lib/jenkins/pa43-modded/rom-build.sh chmod a+x

http://pastebin.com/tidVD6m0

I changed the path parameters and the default to i9300



EDIT2:

This is the jenkins shell input:

Code:
#!/bin/bash
cd ~/pa43-modded/
source rom-build.sh

Hi i had something similar.
it was an erro because in my filename i didnt had the username "jenkins" in it but the build number.
/var/lib/jenkins/pa43-modded/out/target/product/i9300/pa_i9300-ota-eng.jenkins.zip doesn't exist!
so in my case i changed the script that is building the rom.
i removed the $username and set a * (cause build number changes)
this way it will take the zip also when theres a small change in the name.

So go to the folder /var/lib/jenkins/pa43-modded/out/target/product/i9300/
and type ls to see how is the name of your zip file :)

good luck!
 
Last edited:
A

AndroidSlave

Guest
Thanks @Astrali - I will link your post in the troubleshooting section when I have a little time.

Sent from Nexus 5 on Slimkat
 

GuneetAtwal

Senior Member
Oct 6, 2012
2,421
5,327
27
Mohali
OnePlus 7T
@AndroidSlave i followed your guide about Jenkins but the thing is i didn't got any Sign up page and i directly got Login page even if i haven't set any user-name and password
So can you help in resetting everything or there is a workaround?
 
A

AndroidSlave

Guest
@AndroidSlave i followed your guide about Jenkins but the thing is i didn't got any Sign up page and i directly got Login page even if i haven't set any user-name and password
So can you help in resetting everything or there is a workaround?

I think you may try modifying the config.XML to disable the user and it will let you create a new fresh login.

Please read this:
http://stackoverflow.com/questions/6988849/reset-jenkins-configuration-command-line

Sent from Omni Nexus 5
 

GuneetAtwal

Senior Member
Oct 6, 2012
2,421
5,327
27
Mohali
OnePlus 7T
I think you may try modifying the config.XML to disable the user and it will let you create a new fresh login.

Please read this:
http://stackoverflow.com/questions/6988849/reset-jenkins-configuration-command-line

Sent from Omni Nexus 5

Solved my problem by uninstalling and again installing btw please update your Guide as the link you have given for setting up security is not right instead use the one given on Jenkins

EDIT: Is there anyway that i can use the jenkins build server directly via Terminal like XDA Build Box ?
 
Last edited:
A

AndroidSlave

Guest
Solved my problem by uninstalling and again installing btw please update your Guide as the link you have given for setting up security is not right instead use the one given on Jenkins

EDIT: Is there anyway that i can use the jenkins build server directly via Terminal like XDA Build Box ?

Thanks for the info, do you have the link?
 
Last edited:
A

AndroidSlave

Guest
Guys, I'm unable to import git.... Any solutions?

Sent from my amazing Exynos Note 3.

I'm not entirely sure what this has to do with Jenkins. Maybe you should post on a build support thread? Unless I am misunderstanding what you're asking.

Sent from my Nexus 5 using Tapatalk
 

thehacker911

Inactive Recognized Developer
Jan 15, 2013
486
1,301
Gangkofen
Google Pixel 7 Pro
I have one Error.

Code:
fstab_version             = (int) 2
mkbootimg_args            = (str) --ramdisk_offset 0x02000000 --tags_offset 0x01e00000
multistage_support        = (str) 1
ota_script_path           = (str) ./build/tools/releasetools/ota_from_target_files
override_device           = (str) bacon,A0001
recovery_api_version      = (int) 2
recovery_size             = (int) 16777216
selinux_fc                = (str) /tmp/targetfiles-Dgqiim/BOOT/RAMDISK/file_contexts
system_size               = (int) 1388314624
tool_extensions           = (str) device/oppo/common
update_rename_support     = (str) 1
use_set_metadata          = (str) 1
userdata_size             = (int) 13271448576
userdataextra_name        = (str) 64G
userdataextra_size        = (str) 59914792960
using device-specific extensions in device/oppo/common
using custom bootimage makefile device/oneplus/bacon/mkbootimg.mk...
using prebuilt recovery.img...
using custom bootimage makefile device/oneplus/bacon/mkbootimg.mk...
using prebuilt boot.img...
  running:  imgdiff -b /tmp/targetfiles-Dgqiim/SYSTEM/etc/recovery-resource.dat /tmp/tmpmvwrfv /tmp/tmpoiwTxF /tmp/tmp_joxUx
   boot size (5761024) is 34.34% of limit (16777216)
warning radio-update: no radio image in input target_files; not flashing radio
  running:  openssl pkcs8 -in build/target/product/security/testkey.pk8 -inform DER -nocrypt
  running:  java -Xmx2048m -jar /var/lib/jenkins/aokp/out/host/linux-x86/framework/signapk.jar -w build/target/product/security/testkey.x509.pem build/target/product/security/testkey.pk8 /tmp/tmpIIGEck /var/lib/jenkins/aokp/out/target/product/bacon/aokp_bacon-ota-12.zip
done.
ln: failed to access ‘/var/lib/jenkins/aokp/out/target/product/bacon/aokp_bacon-ota-12.zip’: No such file or directory
make: *** [bacon] Error 1
 
A

AndroidSlave

Guest
I have one Error.

Code:
fstab_version             = (int) 2
mkbootimg_args            = (str) --ramdisk_offset 0x02000000 --tags_offset 0x01e00000
multistage_support        = (str) 1
ota_script_path           = (str) ./build/tools/releasetools/ota_from_target_files
override_device           = (str) bacon,A0001
recovery_api_version      = (int) 2
recovery_size             = (int) 16777216
selinux_fc                = (str) /tmp/targetfiles-Dgqiim/BOOT/RAMDISK/file_contexts
system_size               = (int) 1388314624
tool_extensions           = (str) device/oppo/common
update_rename_support     = (str) 1
use_set_metadata          = (str) 1
userdata_size             = (int) 13271448576
userdataextra_name        = (str) 64G
userdataextra_size        = (str) 59914792960
using device-specific extensions in device/oppo/common
using custom bootimage makefile device/oneplus/bacon/mkbootimg.mk...
using prebuilt recovery.img...
using custom bootimage makefile device/oneplus/bacon/mkbootimg.mk...
using prebuilt boot.img...
  running:  imgdiff -b /tmp/targetfiles-Dgqiim/SYSTEM/etc/recovery-resource.dat /tmp/tmpmvwrfv /tmp/tmpoiwTxF /tmp/tmp_joxUx
   boot size (5761024) is 34.34% of limit (16777216)
warning radio-update: no radio image in input target_files; not flashing radio
  running:  openssl pkcs8 -in build/target/product/security/testkey.pk8 -inform DER -nocrypt
  running:  java -Xmx2048m -jar /var/lib/jenkins/aokp/out/host/linux-x86/framework/signapk.jar -w build/target/product/security/testkey.x509.pem build/target/product/security/testkey.pk8 /tmp/tmpIIGEck /var/lib/jenkins/aokp/out/target/product/bacon/aokp_bacon-ota-12.zip
done.
ln: failed to access ‘/var/lib/jenkins/aokp/out/target/product/bacon/aokp_bacon-ota-12.zip’: No such file or directory
make: *** [bacon] Error 1

See if this post helps:
http://xdaforums.com/showthread.php?p=48454597

Sent from my Nexus 5 using Tapatalk
 
Status
Not open for further replies.

Top Liked Posts