Bug 1129143 - Upgrade tc-vcs and fix related emulator building issues r=wcosta
authorjlal@mozilla.com
Thu, 05 Feb 2015 12:15:44 -0800
changeset 245313 43259e1d2f2ed3f374caedf1a10226e74dce8271
parent 245191 4c9ef3a31fa848b4a87add490199e7ed7fba904f
child 245314 977a8b172640fb3fbeded88603fdc77a479f1f0d
push id7677
push userraliiev@mozilla.com
push dateMon, 23 Feb 2015 18:11:24 +0000
treeherdermozilla-aurora@f531d838c055 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerswcosta
bugs1129143
milestone38.0a1
Bug 1129143 - Upgrade tc-vcs and fix related emulator building issues r=wcosta
testing/docker/b2g-build/Dockerfile
testing/docker/b2g-build/VERSION
testing/docker/b2g-build/bin/repository-url.py
testing/docker/b2g-build/releng.repo
testing/docker/b2g-build/system-setup.sh
testing/docker/builder/Dockerfile
testing/docker/builder/VERSION
testing/docker/builder/bin/build-emulator.sh
testing/docker/builder/bin/install-packages.sh
testing/docker/builder/bin/pull-gaia.sh
testing/docker/builder/bin/pull-gecko.sh
testing/docker/builder/emulator-ics.env
testing/docker/builder/emulator-kk.env
testing/docker/builder/emulator.env
testing/docker/builder/git.env
testing/docker/builder/hg.env
testing/docker/phone-builder/bin/build-phone.sh
testing/taskcluster/mach_commands.py
testing/taskcluster/tasks/build.yml
testing/taskcluster/tasks/builds/b2g_desktop_base.yml
testing/taskcluster/tasks/builds/b2g_emulator_kk_debug.yml
testing/taskcluster/tasks/builds/b2g_emulator_kk_opt.yml
testing/taskcluster/tasks/builds/b2g_flame_kk_eng.yml
testing/taskcluster/tasks/builds/b2g_flame_kk_opt.yml
testing/taskcluster/tasks/builds/mulet_linux.yml
--- a/testing/docker/b2g-build/Dockerfile
+++ b/testing/docker/b2g-build/Dockerfile
@@ -1,15 +1,122 @@
-FROM          quay.io/mozilla/base-build:0.0.1
+FROM          centos:centos6
 MAINTAINER    Dustin J. Mitchell <dustin@mozilla.com>
 
-# Run system setup script; this ensures taht the whole process
-# boils down to a single docker layer
-ADD           system-setup.sh   /tmp/system-setup.sh
-RUN           ["/tmp/system-setup.sh"]
+# Run majority of yum installs here so we cache them!
+COPY releng.repo /etc/yum.repos.d/releng.repo
+RUN yum install -y epel-release && \
+  yum update -y && \
+  yum makecache && \
+  yum install -y \
+  # From Building B2G docs
+  GConf2-devel \
+  alsa-lib-devel \
+  autoconf213 \
+  bison \
+  bzip2 \
+  ccache \
+  cmake \
+  curl \
+  curl-devel \
+  dbus-devel \
+  dbus-glib-devel \
+  dbus-glib-devel \
+  dbus-python \
+  file \
+  flex \
+  gawk \
+  gcc473_0moz1 \
+  glibc-devel \
+  glibc-devel.i686 \
+  glibc-static \
+  glibc-static \
+  gstreamer-devel \
+  gstreamer-plugins-base-devel \
+  gtk2-devel \
+  install \
+  iw \
+  libX11-devel \
+  libX11-devel.i686 \
+  libXrandr.i686 \
+  libXt-devel \
+  libcurl-devel \
+  libnotify-devel \
+  libstdc++-static \
+  libstdc++-static \
+  libstdc++.i686 \
+  make \
+  mesa-libGL-devel \
+  mesa-libGL-devel.i686 \
+  mozilla-git \
+  mozilla-python27 \
+  mozilla-python27-mercurial \
+  mpfr-devel.x86_64 \
+  ncurses-devel.i686 \
+  ncurses:-devel \
+  openssh-clients \
+  openssl-devel \
+  patch \
+  perl-DBI \
+  perl-Digest-SHA \
+  pulseaudio-libs-devel \
+  readline-devel.i686 \
+  rsync \
+  screen \
+  subversion-perl \
+  tar \
+  tcl \
+  tk \
+  unzip \
+  uuid \
+  vim \
+  wget \
+  wireless-tools-devel \
+  xorg-x11-server-Xvfb \
+  xorg-x11-server-utils \
+  xz \
+  yasm \
+  zip \
+  zlib-devel \
+  zlib-devel.i686 && \
+  # Remove cached packages. Cached package takes up a lot of space and
+  # distributing them to workers is wasteful.
+  yum clean all
+
+RUN mkdir -p /home/worker/bin
+COPY bin/repository-url.py /home/worker/bin/repository-url.py
+
+# Default to mozilla specific python, etc...
+ENV PATH /tools/python27-mercurial/bin:/tools/python27/bin:$PATH
+ENV PATH /tools/tools/buildfarm/utils:$PATH:/home/worker/bin/
+ENV PATH /tools/gcc-4.7.3-0moz1/bin:$PATH
+
+# Use the libstd++ we installed over all others...
+env LD_LIBRARY_PATH=/tools/gcc-4.7.3-0moz1/lib64:/tools/gcc-4.7.3-0moz1/lib
+
+RUN useradd -d /home/worker -s /bin/bash -m worker
+
+# Terrible symlink hacks so cc points to the gcc version we intend to use...
+RUN ls -lah /tools/gcc-4.7.3-0moz1/bin && ln -s /tools/gcc-4.7.3-0moz1/bin/gcc /tools/gcc-4.7.3-0moz1/bin/cc
+
+# Install node from node's own dist...
+ENV NODE_VERSION v0.10.36
+RUN cd /usr/local/ && \
+    curl https://nodejs.org/dist/$NODE_VERSION/node-$NODE_VERSION-linux-x64.tar.gz | tar -xz --strip-components 1 && \
+    node -v
+
+RUN wget --no-check-certificate https://pypi.python.org/packages/source/s/setuptools/setuptools-1.4.2.tar.gz && \
+    tar -xvf setuptools-1.4.2.tar.gz && \
+    cd setuptools-1.4.2 && python setup.py install && \
+    cd - && rm -rf setuptools-1.4.2* && \
+    curl https://raw.githubusercontent.com/pypa/pip/master/contrib/get-pip.py | python - && \
+    pip install virtualenv
+
+# Generate machine uuid file
+RUN dbus-uuidgen --ensure=/var/lib/dbus/machine-id
 
 # Set variable normally configured at login, by the shells parent process, these
 # are taken from GNU su manual
 ENV           HOME          /home/worker
 ENV           SHELL         /bin/bash
 ENV           USER          worker
 ENV           LOGNAME       worker
 
--- a/testing/docker/b2g-build/VERSION
+++ b/testing/docker/b2g-build/VERSION
@@ -1,1 +1,1 @@
-0.0.1
+0.2.5
new file mode 100755
--- /dev/null
+++ b/testing/docker/b2g-build/bin/repository-url.py
@@ -0,0 +1,28 @@
+#! /usr/bin/env python
+
+import argparse
+
+def repo_url(remote, revision, path):
+    '''
+    Construct a url pointing to the _raw_ file in the given remote this function
+    will handle url construction for both hg and github.
+    '''
+
+    # Ensure remote always ends in a slash...
+    if remote[-1] != '/':
+        remote = remote + '/'
+    if 'hg.mozilla.org' in remote:
+        return '{}raw-file/{}/{}'.format(remote, revision, path);
+    else:
+        return '{}raw/{}/{}'.format(remote, revision, path);
+
+parser = argparse.ArgumentParser(
+    description='Get url for raw file in remote repository'
+)
+
+parser.add_argument('remote', help='URL for remote repository')
+parser.add_argument('revision', help='Revision in remote repository')
+parser.add_argument('path', help='Path to file in remote repository')
+
+args = parser.parse_args()
+print(repo_url(args.remote, args.revision, args.path))
new file mode 100644
--- /dev/null
+++ b/testing/docker/b2g-build/releng.repo
@@ -0,0 +1,6 @@
+[releng]
+name=releng
+descr=releng-specific packages from mockbuild-repos
+baseurl=http://mockbuild-repos.pub.build.mozilla.org/releng/public/CentOS/6/x86_64
+enabled=1
+gpgcheck=0
deleted file mode 100755
--- a/testing/docker/b2g-build/system-setup.sh
+++ /dev/null
@@ -1,124 +0,0 @@
-#!/bin/bash -ve
-
-################################### setup.sh ###################################
-
-### Check that we are running as root
-test `whoami` == 'root';
-
-yum install -y                      \
-  alsa-lib-devel                    \
-  autoconf213                       \
-  curl-devel                        \
-  dbus-glib-devel                   \
-  glibc-static                      \
-  gstreamer-devel                   \
-  gstreamer-plugins-base-devel      \
-  gtk2-devel                        \
-  libstdc++-static                  \
-  libXt-devel                       \
-  mesa-libGL-devel                  \
-  pulseaudio-libs-devel             \
-  wireless-tools-devel              \
-  yasm                              \
-  dbus-python                       \
-  ;
-
-yum install -y                      \
-  libcurl-devel                     \
-  openssl-devel                     \
-  dbus-devel                        \
-  dbus-glib-devel                   \
-  GConf2-devel                      \
-  iw                                \
-  libnotify-devel                   \
-  unzip                             \
-  uuid                              \
-  xorg-x11-server-Xvfb              \
-  xorg-x11-server-utils             \
-  tar                               \
-  tcl                               \
-  tk                                \
-  unzip                             \
-  zip                               \
-  ;
-
-# From Building B2G docs
-yum install -y                      \
-  install                           \
-  bison                             \
-  bzip2                             \
-  ccache                            \
-  curl                              \
-  flex                              \
-  gawk                              \
-  gcc-c++                           \
-  glibc-devel                       \
-  glibc-static                      \
-  libstdc++-static                  \
-  libX11-devel                      \
-  make                              \
-  ncurses-devel                     \
-  patch                             \
-  zlib-devel                        \
-  ncurses-devel.i686                \
-  readline-devel.i686               \
-  zlib-devel.i686                   \
-  libX11-devel.i686                 \
-  mesa-libGL-devel.i686             \
-  glibc-devel.i686                  \
-  libstdc++.i686                    \
-  libXrandr.i686                    \
-  perl-Digest-SHA                   \
-  wget                              \
-  ;
-
-# Install some utilities, we'll be using nodejs in automation scripts, maybe we
-# shouldn't we can clean up later
-yum install -y                      \
-  screen                            \
-  vim                               \
-  nodejs                            \
-  npm                               \
-  ;
-
-# Install mozilla specific packages
-
-# puppetagain packages
-base_url="http://mockbuild-repos.pub.build.mozilla.org/releng/public/CentOS/6/x86_64/"
-
-# Install Python 2.7, pip, and virtualenv (needed for things like mach)
-rpm -ih $base_url/mozilla-python27-2.7.3-1.el6.x86_64.rpm
-export PATH="/tools/python27-mercurial/bin:/tools/python27/bin:$PATH"
-wget --no-check-certificate https://pypi.python.org/packages/source/s/setuptools/setuptools-1.4.2.tar.gz
-tar -xvf setuptools-1.4.2.tar.gz
-cd setuptools-1.4.2 && python setup.py install
-cd - && rm -rf setuptools-1.4.2*
-curl https://raw.githubusercontent.com/pypa/pip/master/contrib/get-pip.py | python -
-pip install virtualenv
-
-# Install more recent version of mercurial
-rpm -ih $base_url/mozilla-python27-mercurial-3.1.2-1.el6.x86_64.rpm
-
-# Install more recent version of git and dependencies
-yum install -y    \
-  perl-DBI        \
-  subversion-perl \
-  ;
-rpm -ih $base_url/mozilla-git-1.7.9.4-3.el6.x86_64.rpm
-
-# Install gcc to build gecko
-rpm -ih $base_url/gcc473_0moz1-4.7.3-0moz1.x86_64.rpm
-
-### Generate machine uuid file
-dbus-uuidgen --ensure=/var/lib/dbus/machine-id
-
-### Clean up from setup
-# Remove cached packages. Cached package takes up a lot of space and
-# distributing them to workers is wasteful.
-yum clean all
-
-# Remove the setup.sh setup, we don't really need this script anymore, deleting
-# it keeps the image as clean as possible.
-rm $0; echo "Deleted $0";
-
-################################### setup.sh ###################################
--- a/testing/docker/builder/Dockerfile
+++ b/testing/docker/builder/Dockerfile
@@ -1,14 +1,12 @@
-FROM          quay.io/mozilla/b2g-build:0.0.1
+FROM          quay.io/mozilla/b2g-build:0.2.5
 MAINTAINER    Dustin J. Mitchell <dustin@mozilla.com>
 
-ENV PATH /tools/python27-mercurial/bin:/tools/python27/bin:/tools/tools/buildfarm/utils:$PATH:/home/worker/bin/
 ENV PYTHONPATH /tools/tools/lib/python:$PYTHONPATH
-
 ENV TOOLTOOL_CACHE  /home/worker/tools/tooltool-cache
 
 # Add utilities and configuration
 RUN mkdir -p /home/worker/bin /home/worker/tools
 RUN chown -R worker:worker /home/worker/* /home/worker/.*
 
 # Install android repo tool
 RUN curl https://storage.googleapis.com/git-repo-downloads/repo > /home/worker/bin/repo
@@ -20,19 +18,19 @@ RUN hg clone http://hg.mozilla.org/build
       python setup.py install
 
 
 # Initialize git (makes repo happy)
 RUN git config --global user.email "docker@docker.com" && \
     git config --global user.name "docker"
 
 # VCS Tools
-RUN npm install -g taskcluster-vcs@0.0.2
+RUN npm install -g taskcluster-vcs@2.1.2
 
 # Add bin tools last as they are most likely to change
-ADD bin /home/worker/bin
+COPY bin /home/worker/bin
 
 # TODO enable worker
 # TODO volume mount permissions will be an issue
 # USER worker
 
 # Set a default command useful for debugging
 CMD ["/bin/bash", "--login"]
--- a/testing/docker/builder/VERSION
+++ b/testing/docker/builder/VERSION
@@ -1,1 +1,1 @@
-0.0.30
+0.2.6
--- a/testing/docker/builder/bin/build-emulator.sh
+++ b/testing/docker/builder/bin/build-emulator.sh
@@ -9,28 +9,28 @@ test $MOZHARNESS_REV # mozharness revisi
 test $TARGET
 
 # First check if the mozharness directory is available. This is intended to be
 # used locally in development to test mozharness changes:
 #
 #   $ docker -v your_mozharness:/home/worker/mozharness ...
 #
 if [ ! -d mozharness ]; then
-  tc-vcs clone $MOZHARNESS_REPOSITORY -u $MOZHARNESS_REV mozharness
+  tc-vcs checkout mozharness $MOZHARNESS_REPOSITORY $MOZHARNESS_REPOSITORY $MOZHARNESS_REV
 fi
 
 OBJDIR="$HOME/object-folder"
 
 if [ ! -d $OBJDIR ]; then
   mkdir -p $OBJDIR
 fi
 
-if [ ! -d $OBJDIR/B2G ]; then
-  tc-vcs clone https://git.mozilla.org/b2g/B2G.git $OBJDIR/B2G
-fi
+# Figure out where the remote manifest is so we can use caches for it.
+MANIFEST=$(repository-url.py $GECKO_HEAD_REPOSITORY $GECKO_HEAD_REV b2g/config/$TARGET/sources.xml)
+tc-vcs repo-checkout $OBJDIR/B2G https://git.mozilla.org/b2g/B2G.git $MANIFEST
 
 debug_flag=""
 if [ 0$B2G_DEBUG -ne 0 ]; then
   debug_flag='--debug'
 fi
 
 ./mozharness/scripts/b2g_build.py \
   --config b2g/taskcluster-emulator.py \
--- a/testing/docker/builder/bin/install-packages.sh
+++ b/testing/docker/builder/bin/install-packages.sh
@@ -16,18 +16,12 @@ if [ ! -d "$gecko_dir/sccache" ]; then
 fi
 
 # Remove cached moztt directory if it exists when a user supplied a git url/revision
 if [ ! -z $MOZTT_GIT_URL ] || [ ! -z $MOZTT_REVISION ]; then
   echo "Removing cached moztt package"
   rm -rf moztt
 fi
 
-if [ ! -d "$gecko_dir/moztt" ]; then
-  moztt_url=${MOZTT_GIT_URL:=https://github.com/mozilla-b2g/moztt}
-  moztt_revision=${MOZTT_REVISION:=master}
-  tc-vcs clone $moztt_url $gecko_dir/moztt
-  tc-vcs checkout-revision \
-    $gecko_dir/moztt $moztt_url $moztt_revision $moztt_revision
-  echo "moztt repository: $moztt_url"
-  echo "moztt revision: $(tc-vcs revision $gecko_dir/moztt)"
-fi
+moztt_url=${MOZTT_GIT_URL:=https://github.com/mozilla-b2g/moztt}
+moztt_revision=${MOZTT_REVISION:=master}
 
+tc-vcs checkout $gecko_dir/moztt $moztt_url $moztt_url $moztt_revision
--- a/testing/docker/builder/bin/pull-gaia.sh
+++ b/testing/docker/builder/bin/pull-gaia.sh
@@ -1,23 +1,9 @@
 #! /bin/bash -e
 
 gecko_dir=$1
 target=$2
 
 gaia_repo=$(gaia_props.py $gecko_dir repository)
 gaia_rev=$(gaia_props.py $gecko_dir revision)
 
-# Initial clone
-if [ ! -d "$target" ]; then
-  echo "Running Initial gaia clone"
-  mkdir -p $(dirname $target)
-  tc-vcs clone $gaia_repo $target
-fi
-
-echo "Checking out gaia $gaia_repo $gaia_rev"
-tc-vcs checkout-revision \
-  $target \
-  $gaia_repo \
-  $gaia_rev \
-  $gaia_rev
-
-
+tc-vcs checkout $target $gaia_repo $gaia_repo $gaia_rev
--- a/testing/docker/builder/bin/pull-gecko.sh
+++ b/testing/docker/builder/bin/pull-gecko.sh
@@ -2,20 +2,13 @@
 
 target=$1
 
 test $GECKO_BASE_REPOSITORY # base repository
 test $GECKO_HEAD_REPOSITORY # repository to pull from
 test $GECKO_HEAD_REF # reference if needed (usually same as rev)
 test $GECKO_HEAD_REV # revision to checkout after pull
 
-if [ ! -d $target ];
-then
-  echo 'Running initial clone of gecko...'
-  tc-vcs clone $GECKO_BASE_REPOSITORY $target
-fi
-
-echo "Updating $target to $GECKO_HEAD_REPOSITORY $GECKO_HEAD_REF $GECKO_HEAD_REV"
-tc-vcs checkout-revision \
-  $target \
+tc-vcs checkout $target \
+  $GECKO_BASE_REPOSITORY \
   $GECKO_HEAD_REPOSITORY \
+  $GECKO_HEAD_REV \
   $GECKO_HEAD_REF \
-  $GECKO_HEAD_REV
new file mode 100644
--- /dev/null
+++ b/testing/docker/builder/emulator-ics.env
@@ -0,0 +1,6 @@
+GECKO_BASE_REPOSITORY=https://hg.mozilla.org/mozilla-central
+GECKO_HEAD_REPOSITORY=https://hg.mozilla.org/mozilla-central
+MOZHARNESS_REPOSITORY=https://github.com/lightsofapollo/build-mozharness
+MOZHARNESS_REV=emulator-perf
+GECKO_HEAD_REV=tip
+TARGET=emulator
new file mode 100644
--- /dev/null
+++ b/testing/docker/builder/emulator-kk.env
@@ -0,0 +1,6 @@
+GECKO_BASE_REPOSITORY=https://hg.mozilla.org/mozilla-central
+GECKO_HEAD_REPOSITORY=https://hg.mozilla.org/mozilla-central
+MOZHARNESS_REPOSITORY=https://github.com/lightsofapollo/build-mozharness
+MOZHARNESS_REV=emulator-perf
+GECKO_HEAD_REV=tip
+TARGET=emulator-kk
--- a/testing/docker/builder/emulator.env
+++ b/testing/docker/builder/emulator.env
@@ -1,4 +1,5 @@
+MOZCONFIG=/home/worker/gecko/source/b2g/config/mozconfigs/linux64_gecko/nightly
 GECKO_HEAD_REPOSITORY=https://hg.mozilla.org/mozilla-central
 GECKO_HEAD_REV=tip
 TARGET=emulator
 B2G_CONFIG=emulator-ics
--- a/testing/docker/builder/git.env
+++ b/testing/docker/builder/git.env
@@ -1,5 +1,6 @@
 GECKO_BASE_REPOSITORY=https://github.com/mozilla/gecko-dev
 GECKO_HEAD_REPOSITORY=https://github.com/mozilla/gecko-dev
 GECKO_HEAD_REF=master
 GECKO_HEAD_REV=master
-MOZCONFIG=/home/worker/gecko/source/b2g/config/mozconfigs/linux64_gecko/nightly
+MOZHARNESS_REPOSITORY=http://hg.mozilla.org/build/mozharness
+MOZHARNESS_REV=tip
--- a/testing/docker/builder/hg.env
+++ b/testing/docker/builder/hg.env
@@ -1,5 +1,7 @@
 GECKO_BASE_REPOSITORY=https://hg.mozilla.org/mozilla-central
 GECKO_HEAD_REPOSITORY=https://hg.mozilla.org/mozilla-central
 GECKO_HEAD_REF=tip
 GECKO_HEAD_REV=tip
 MOZCONFIG=/home/worker/gecko/source/b2g/config/mozconfigs/linux64_gecko/nightly
+MOZHARNESS_REPOSITORY=http://hg.mozilla.org/build/mozharness
+MOZHARNESS_REV=tip
--- a/testing/docker/phone-builder/bin/build-phone.sh
+++ b/testing/docker/phone-builder/bin/build-phone.sh
@@ -15,28 +15,26 @@ if ! validate_task.py; then
 fi
 
 # First check if the mozharness directory is available. This is intended to be
 # used locally in development to test mozharness changes:
 #
 #   $ docker -v your_mozharness:/home/worker/mozharness ...
 #
 if [ ! -d mozharness ]; then
-  tc-vcs clone $MOZHARNESS_REPOSITORY -u $MOZHARNESS_REV mozharness
+  tc-vcs checkout mozharness $MOZHARNESS_REPOSITORY $MOZHARNESS_REPOSITORY $MOZHARNESS_REV
 fi
 
 OBJDIR="$HOME/object-folder"
 
 if [ ! -d $OBJDIR ]; then
   mkdir -p $OBJDIR
 fi
 
-if [ ! -d $OBJDIR/B2G ]; then
-  tc-vcs clone https://git.mozilla.org/b2g/B2G.git $OBJDIR/B2G
-fi
+tc-vcs repo-checkout $OBJDIR/B2G https://git.mozilla.org/b2g/B2G.git $MANIFEST
 
 debug_flag=""
 if [ 0$B2G_DEBUG -ne 0 ]; then
   debug_flag='--debug'
 fi
 
 backup_file=$(aws --output=text s3 ls s3://b2g-phone-backups/$TARGET/ | tail -1 | awk '{print $NF}')
 
--- a/testing/taskcluster/mach_commands.py
+++ b/testing/taskcluster/mach_commands.py
@@ -132,29 +132,29 @@ class DecisionTask(object):
 @CommandProvider
 class Graph(object):
     @Command('taskcluster-graph', category="ci",
         description="Create taskcluster task graph")
     @CommandArgument('--base-repository',
         default=os.environ.get('GECKO_BASE_REPOSITORY'),
         help='URL for "base" repository to clone')
     @CommandArgument('--mozharness-repository',
-        default='http://hg.mozilla.org/build/mozharness',
+        default='https://github.com/lightsofapollo/build-mozharness',
         help='URL for custom mozharness repo')
     @CommandArgument('--head-repository',
         default=os.environ.get('GECKO_HEAD_REPOSITORY'),
         help='URL for "head" repository to fetch revision from')
     @CommandArgument('--head-ref',
         default=os.environ.get('GECKO_HEAD_REF'),
         help='Reference (this is same as rev usually for hg)')
     @CommandArgument('--head-rev',
         default=os.environ.get('GECKO_HEAD_REV'),
         help='Commit revision to use from head repository')
     @CommandArgument('--mozharness-rev',
-        default='tip',
+        default='emulator-perf',
         help='Commit revision to use from mozharness repository')
     @CommandArgument('--message',
         help='Commit message to be parsed. Example: "try: -b do -p all -u all"')
     @CommandArgument('--revision-hash',
             required=False,
             help='Treeherder revision hash to attach results to')
     @CommandArgument('--project',
         required=True,
--- a/testing/taskcluster/tasks/build.yml
+++ b/testing/taskcluster/tasks/build.yml
@@ -5,17 +5,17 @@ taskId: {{build_slugid}}
 
 task:
   created: '{{now}}'
   deadline: '{{#from_now}}24 hours{{/from_now}}'
   metadata:
     source: http://todo.com/soon
     owner: {{owner}}
 
-  workerType: build-c4-2xlarge
+  workerType: b2gbuild
   provisionerId: aws-provisioner
   schedulerId: task-graph-scheduler
 
   scopes:
     # Nearly all of our build tasks use tc-vcs so just include the scope across
     # the board.
     - 'docker-worker:cache:tc-vcs'
     - 'docker-worker:image:{{#docker_image}}builder{{/docker_image}}'
--- a/testing/taskcluster/tasks/builds/b2g_desktop_base.yml
+++ b/testing/taskcluster/tasks/builds/b2g_desktop_base.yml
@@ -1,15 +1,16 @@
 $inherits:
   from: 'tasks/build.yml'
 task:
   metadata:
     name: "[TC] B2G Desktop {{build_type}}"
     description: B2G Desktop {{build_type}}
 
+  workerType: b2gbuild-desktop
   scopes:
     - 'docker-worker:cache:sources-gecko'
     - 'docker-worker:cache:sources-gaia'
     - 'docker-worker:cache:build-b2g-desktop-objects'
 
   payload:
     cache:
       sources-gaia: '/home/worker/gaia'
--- a/testing/taskcluster/tasks/builds/b2g_emulator_kk_debug.yml
+++ b/testing/taskcluster/tasks/builds/b2g_emulator_kk_debug.yml
@@ -1,11 +1,12 @@
 $inherits:
   from: 'tasks/builds/b2g_emulator_base.yml'
 task:
+  workerType: b2gbuild-emulator-kk
   scopes:
     - 'docker-worker:cache:build-emulator-kk-debug'
   metadata:
     name: '[TC] B2G Emulator KK Debug'
 
   extra:
     treeherder:
       collection:
--- a/testing/taskcluster/tasks/builds/b2g_emulator_kk_opt.yml
+++ b/testing/taskcluster/tasks/builds/b2g_emulator_kk_opt.yml
@@ -1,11 +1,12 @@
 $inherits:
   from: 'tasks/builds/b2g_emulator_base.yml'
 task:
+  workerType: b2gbuild-emulator-kk
   scopes:
     - 'docker-worker:cache:build-emulator-kk-opt'
   metadata:
     name: '[TC] B2G KK Emulator Opt'
 
   extra:
     treeherder:
       machine:
--- a/testing/taskcluster/tasks/builds/b2g_flame_kk_eng.yml
+++ b/testing/taskcluster/tasks/builds/b2g_flame_kk_eng.yml
@@ -1,11 +1,12 @@
 $inherits:
   from: 'tasks/builds/b2g_phone_base.yml'
 task:
+  workerType: b2gbuild-emulator-kk
   scopes:
     - 'docker-worker:cache:build-flame-kk-eng'
   metadata:
     name: '[TC] B2G Flame KK Eng'
 
   extra:
     treeherder:
       symbol: Be
--- a/testing/taskcluster/tasks/builds/b2g_flame_kk_opt.yml
+++ b/testing/taskcluster/tasks/builds/b2g_flame_kk_opt.yml
@@ -1,11 +1,12 @@
 $inherits:
   from: 'tasks/builds/b2g_phone_base.yml'
 task:
+  workerType: b2gbuild-emulator-kk
   scopes:
     - 'docker-worker:cache:build-flame-kk-opt'
   metadata:
     name: '[TC] B2G Flame KK Opt'
 
   payload:
     cache:
       build-flame-kk-opt: /home/worker/object-folder
--- a/testing/taskcluster/tasks/builds/mulet_linux.yml
+++ b/testing/taskcluster/tasks/builds/mulet_linux.yml
@@ -1,15 +1,16 @@
 $inherits:
   from: 'tasks/build.yml'
 task:
   metadata:
     name: '[TC] Mulet Linux x64 Opt'
     description: Mulet Linux x64 Opt
 
+  workerType: b2gbuild-desktop
   scopes:
     - 'docker-worker:cache:sources-gecko'
     - 'docker-worker:cache:build-mulet-linux-objects'
     - 'docker-worker:cache:tooltool-cache'
 
   payload:
     cache:
       sources-gecko: '/home/worker/gecko'