Bug 1097825 - Fix graph level scopes for local testing r=wcosta
Merge pull request #16 from lightsofapollo/bug-1097825

Bug 1097825 - Fix graph level scopes for local testing r=wcosta
Bug 1085620 part1: Install virtualenv in the base image.

virtualenv is a dependency for mozharness.
Bug 1085620 part2: Support for emulator builds in the builder image.

The setup of builder image moved to system-setup.sh script because
needs to do more complex work, like downloading repo and installing
mozilla buildtools package.

The build-emulator.sh script is reponsible for building emulators.
Besides the REPOSITORY and REVISION environment variables, it requires
TARGET and B2G_CONFIG too.
Bug 1085620 part3: Add emulator build task.

The "mach ci-build" has a new optional argument called b2g-config. This
allows the user to pass the b2g config directory for the target. This
argument is necessary for emulator and phone builds.
Bug 1085620 part4: Support debug builds.

Phone and emualtor builds depends on the environment variable B2G_DEBUG
for debug builds.

mach ci-build now has the --debug option to enable debug builds.
Bug 1085620 part5: Support emulator builds in trygraph.

Emulator tasks have some additional parameters not found in other
tasks. Therefore, builds can have an 'additional-parameters' field in
which specific task template replacements can be passed to trygraph.
This field is optional.

Moreover, the syntax for job_flags.yml builds was changed a bit.
Now, instead of:

builds:
  <platform>:
    types:
      opt: <task>
      debug: <task>

The syntax is:

builds:
  <platform>:
    types:
      opt:
        task: <task>
        additional-parameters:
          <parameter 1>: <value>
          <parameter 2>: <value>
          ...
      debug:
        task: <task>
        additional-parameters:
          <parameter 1>: <value>
          <parameter 2>: <value>
          ...