User:Hwine/How To Replicate b2g build farm repo usage
From MozillaWiki
This page describes how to hack a box so it will pull down repositories the same way as occurs in the build farm. The first use case for this is to attempt to replicate odd git behavior. Note that the information below is not sufficient to actually build b2g - for instructions on that, please refer to the Official Docs
Setting up the box
Here's the steps to set this up on a unix like box:
- make sure hg & git are installed
- sudo mkdir /builds && sudo chown $USER/builds
- mkdir my_test_dir && cd $_
- hg clone https://hg.mozilla.org/build/tools
- hg clone https://hg.mozilla.org/build/mozharness
Getting the properties file
Get the values for the buildbot_properties.json from tbpl, in this case from last night's nightly build as follows:
- find the Nightly build (will have 'N's in the entry immediately before the kick off time, e.g. https://tbpl.mozilla.org/?tree=Mozilla-Aurora&rev=a559848a8a00 for Wed morning)
- go down to the "B2G Device Image Opt" section
- click the 'N' next to the device you want
- click the "view full log" link
- scroll down until you find the first mozharness output (timestamp in column 1)
- copy the json below "Using buildbot properties:" and edit to remove the leading timestamps
- that's the contents for your file -- make sure it has the extension '.json'
Pulling the working directories
- copy the json file to buildprops.json in the current directory.
- run the command:
PATH=`pwd`/tools/buildfarm/utils:$PATH PROPERTIES_FILE=buildbot_properties.json mozharness/scripts/b2g_build.py \ --target helix --config b2g/releng-private-updates.py \ --checkout-sources
- repeat as needed for each device as --target