User:Hwine/How To Replicate b2g build farm repo usage

From MozillaWiki
Jump to: navigation, search

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:

  1. make sure hg & git are installed
  2. sudo mkdir /builds && sudo chown $USER/builds
  3. mkdir my_test_dir && cd $_
  4. hg clone https://hg.mozilla.org/build/tools
  5. 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:

  1. 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)
  2. go down to the "B2G Device Image Opt" section
  3. click the 'N' next to the device you want
  4. click the "view full log" link
  5. scroll down until you find the first mozharness output (timestamp in column 1)
  6. copy the json below "Using buildbot properties:" and edit to remove the leading timestamps
  7. 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