Bug 1227355 - Configure b2g-ota branch and add update channel r=wcosta a=b2g-otaneedsthis
authorGregory Arndt <garndt@mozilla.com>
Mon, 30 Nov 2015 20:48:01 -0600
changeset 309026 1003fca97839fdfbfefb89c48c9e05a940bc9fb9
parent 309025 974fe614d5299159dc16d98d97d76af653158d29
child 309059 7b9ba9b65bbe97df8efede62d6701244b10d8416
push id5513
push userraliiev@mozilla.com
push dateMon, 25 Jan 2016 13:55:34 +0000
treeherdermozilla-beta@5ee97dd05b5c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerswcosta, b2g-otaneedsthis
bugs1227355
milestone45.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1227355 - Configure b2g-ota branch and add update channel r=wcosta a=b2g-otaneedsthis
testing/mozharness/configs/b2g/taskcluster-spark-dogfood.py
testing/mozharness/configs/b2g/taskcluster-spark-ota-balrog.py
testing/mozharness/configs/b2g/taskcluster-spark-ota.py
testing/taskcluster/mach_commands.py
testing/taskcluster/tasks/branches/b2g-ota/job_flags.yml
testing/taskcluster/tasks/branches/mozilla-b2g44_v2_5/job_flags.yml
testing/taskcluster/tasks/branches/mozilla-central/job_flags.yml
testing/taskcluster/tasks/builds/b2g_aries_spark_dogfood.yml
testing/taskcluster/tasks/builds/b2g_aries_spark_ota_balrog_debug.yml
testing/taskcluster/tasks/builds/b2g_aries_spark_ota_balrog_opt.yml
testing/taskcluster/tasks/builds/b2g_aries_spark_ota_base.yml
testing/taskcluster/tasks/builds/b2g_flame_kk_ota_base.yml
testing/taskcluster/tasks/builds/b2g_flame_kk_ota_debug.yml
testing/taskcluster/tasks/builds/b2g_flame_kk_ota_opt.yml
testing/taskcluster/tasks/builds/b2g_nexus_4_kk_ota_debug.yml
testing/taskcluster/tasks/builds/b2g_nexus_5l_ota_debug.yml
--- a/testing/mozharness/configs/b2g/taskcluster-spark-dogfood.py
+++ b/testing/mozharness/configs/b2g/taskcluster-spark-dogfood.py
@@ -10,17 +10,16 @@ config = {
         'prep-upload'
     ],
     "nightly_build": True,
     "env": {
         "GAIA_OPTIMIZE": "1",
         "B2G_UPDATER": "1",
         "LIGHTSABER": "1",
         "DOGFOOD": "1",
-        "B2G_UPDATE_CHANNEL": "dogfood",
         "BOWER_FLAGS": "--allow-root",
         "B2G_PATH": "%(work_dir)s",
         "GAIA_DISTRIBUTION_DIR": "%(work_dir)s/gaia/distros/spark",
         "WGET_OPTS": "-c -q",
         "B2G_FOTA_FULLIMG_PARTS": "/boot:boot.img /system:system.img /recovery:recovery.img"
     },
     "update_types": [ "ota", "fota", "fota:fullimg" ],
     "is_automation": True,
new file mode 100644
--- /dev/null
+++ b/testing/mozharness/configs/b2g/taskcluster-spark-ota-balrog.py
@@ -0,0 +1,35 @@
+#!/usr/bin/env python
+import os.path
+config = {
+    "default_vcs": "tc-vcs",
+    "default_actions": [
+        'checkout-sources',
+        'build',
+        'build-symbols',
+        'make-updates',
+        'prep-upload',
+        'submit-to-balrog'
+    ],
+    "balrog_credentials_file": "balrog_credentials",
+    "nightly_build": True,
+    "env": {
+        "GAIA_OPTIMIZE": "1",
+        "B2G_UPDATER": "1",
+        "LIGHTSABER": "1",
+        "BOWER_FLAGS": "--allow-root",
+        "B2G_PATH": "%(work_dir)s",
+        "GAIA_DISTRIBUTION_DIR": "%(work_dir)s/gaia/distros/spark",
+        "WGET_OPTS": "-c -q"
+    },
+    "is_automation": True,
+    "repo_remote_mappings": {
+        'https://android.googlesource.com/': 'https://git.mozilla.org/external/aosp',
+        'git://codeaurora.org/': 'https://git.mozilla.org/external/caf',
+        'https://git.mozilla.org/b2g': 'https://git.mozilla.org/b2g',
+        'git://github.com/mozilla-b2g/': 'https://git.mozilla.org/b2g',
+        'git://github.com/mozilla/': 'https://git.mozilla.org/b2g',
+        'https://git.mozilla.org/releases': 'https://git.mozilla.org/releases',
+        'http://android.git.linaro.org/git-ro/': 'https://git.mozilla.org/external/linaro',
+        'git://github.com/apitrace/': 'https://git.mozilla.org/external/apitrace',
+    },
+}
--- a/testing/mozharness/configs/b2g/taskcluster-spark-ota.py
+++ b/testing/mozharness/configs/b2g/taskcluster-spark-ota.py
@@ -2,18 +2,17 @@
 import os.path
 config = {
     "default_vcs": "tc-vcs",
     "default_actions": [
         'checkout-sources',
         'build',
         'build-symbols',
         'make-updates',
-        'prep-upload',
-        'submit-to-balrog'
+        'prep-upload'
     ],
     "balrog_credentials_file": "balrog_credentials",
     "nightly_build": True,
     "env": {
         "GAIA_OPTIMIZE": "1",
         "B2G_UPDATER": "1",
         "LIGHTSABER": "1",
         "BOWER_FLAGS": "--allow-root",
--- a/testing/taskcluster/mach_commands.py
+++ b/testing/taskcluster/mach_commands.py
@@ -29,16 +29,22 @@ ARTIFACT_URL = 'https://queue.taskcluste
 
 DEFINE_TASK = 'queue:define-task:aws-provisioner-v1/{}'
 
 DEFAULT_TRY = 'try: -b do -p all -u all'
 DEFAULT_JOB_PATH = os.path.join(
     ROOT, 'tasks', 'branches', 'base_jobs.yml'
 )
 
+def merge_dicts(*dicts):
+    merged_dict = {}
+    for dictionary in dicts:
+        merged_dict.update(dictionary)
+    return merged_dict
+
 def gaia_info():
     '''
     Fetch details from in tree gaia.json (which links this version of
     gecko->gaia) and construct the usual base/head/ref/rev pairing...
     '''
     gaia = json.load(open(os.path.join(GECKO, 'b2g', 'config', 'gaia.json')))
 
     if gaia['git'] is None or \
@@ -376,17 +382,17 @@ class Graph(object):
             'description': 'Task graph generated via ./mach taskcluster-graph',
             'name': 'task graph local'
         }
 
         all_routes = {}
 
         for build in job_graph:
             interactive = cmdline_interactive or build["interactive"]
-            build_parameters = dict(parameters)
+            build_parameters = merge_dicts(parameters, build['additional-parameters']);
             build_parameters['build_slugid'] = slugid()
             build_task = templates.load(build['task'], build_parameters)
 
             # Copy build_* attributes to expose them to post-build tasks
             # as well as json routes and tests
             task_extra = build_task['task']['extra']
             build_parameters['build_name'] = task_extra['build_name']
             build_parameters['build_type'] = task_extra['build_type']
@@ -479,32 +485,39 @@ class Graph(object):
                 build_treeherder_config['collection'] = { 'opt': True }
 
             if len(build_treeherder_config['collection'].keys()) != 1:
                 message = '({}), extra.treeherder.collection must contain one type'
                 raise ValueError(message.fomrat(build['task']))
 
             for post_build in build['post-build']:
                 # copy over the old parameters to update the template
-                post_parameters = copy.copy(build_parameters)
+                # TODO additional-parameters is currently not an option, only
+                # enabled for build tasks
+                post_parameters = merge_dicts(build_parameters,
+                                              post_build.get('additional-parameters', {}))
                 post_task = configure_dependent_task(post_build['task'],
                                                      post_parameters,
                                                      slugid(),
                                                      templates,
                                                      build_treeherder_config)
                 normalize_image_details(graph,
                                         post_task,
                                         seen_images,
                                         build_parameters,
                                         os.environ.get('TASK_ID', None))
                 set_interactive_task(post_task, interactive)
                 graph['tasks'].append(post_task)
 
             for test in build['dependents']:
                 test = test['allowed_build_tasks'][build['task']]
+                # TODO additional-parameters is currently not an option, only
+                # enabled for build tasks
+                test_parameters = merge_dicts(build_parameters,
+                                              test.get('additional-parameters', {}))
                 test_parameters = copy.copy(build_parameters)
                 if tests_url:
                     test_parameters['tests_url'] = tests_url
                 if test_packages_url:
                     test_parameters['test_packages_url'] = test_packages_url
                 if mozharness_url:
                     test_parameters['mozharness_url'] = mozharness_url
                 test_definition = templates.load(test['task'], {})['task']
new file mode 100644
--- /dev/null
+++ b/testing/taskcluster/tasks/branches/b2g-ota/job_flags.yml
@@ -0,0 +1,76 @@
+---
+# For complete sample of all build and test jobs,
+# see <gecko>/testing/taskcluster/tasks/branches/base_job_flags.yml
+
+$inherits:
+  from: tasks/branches/base_job_flags.yml
+
+builds:
+  aries:
+    platforms:
+      - b2g
+    types:
+      opt:
+        task: tasks/builds/b2g_aries_spark_opt.yml
+      debug:
+        task: tasks/builds/b2g_aries_spark_debug.yml
+  aries-eng:
+    platforms:
+      - b2g
+    types:
+      opt:
+        task: tasks/builds/b2g_aries_eng.yml
+  aries-dogfood:
+    platforms:
+      - b2g
+    types:
+      opt:
+        task: tasks/builds/b2g_aries_spark_dogfood.yml
+        additional-parameters:
+          b2g_update_channel: 'b2g-ota'
+  aries-ota:
+    platforms:
+      - b2g
+    types:
+      opt:
+        task: tasks/builds/b2g_aries_spark_ota_opt.yml
+        additional-parameters:
+          b2g_update_channel: 'b2g-ota'
+      debug:
+        task: tasks/builds/b2g_aries_spark_ota_debug.yml
+        additional-parameters:
+          b2g_update_channel: 'b2g-ota'
+  flame-kk:
+    platforms:
+      - b2g
+    types:
+      opt:
+        task: tasks/builds/b2g_flame_kk_opt.yml
+      debug:
+        task: tasks/builds/b2g_flame_kk_debug.yml
+  flame-kk-eng:
+    platforms:
+      - b2g
+    types:
+      opt:
+        task: tasks/builds/b2g_flame_kk_eng.yml
+  flame-kk-spark-eng:
+    platforms:
+      - b2g
+    types:
+      opt:
+        task: tasks/builds/b2g_flame_kk_spark_eng.yml
+  flame-kk-ota:
+    platforms:
+      - b2g
+    types:
+      opt:
+        task: tasks/builds/b2g_flame_kk_ota_opt.yml
+        additional-parameters:
+          b2g_update_channel: 'b2g-ota'
+      debug:
+        task: tasks/builds/b2g_flame_kk_ota_debug.yml
+        additional-parameters:
+          b2g_update_channel: 'b2g-ota'
+
+tests: []
--- a/testing/taskcluster/tasks/branches/mozilla-b2g44_v2_5/job_flags.yml
+++ b/testing/taskcluster/tasks/branches/mozilla-b2g44_v2_5/job_flags.yml
@@ -7,35 +7,37 @@
 
 builds:
   aries-dogfood:
     platforms:
       - b2g
     types:
       opt:
         task: tasks/builds/b2g_aries_spark_dogfood.yml
+        additional-parameters:
+          b2g_update_channel: 'nightly-b2g44'
   flame-kk-ota:
     platforms:
       - b2g
     types:
       debug:
         task: tasks/builds/b2g_flame_kk_ota_debug.yml
+        additional-parameters:
+          b2g_update_channel: 'nightly-b2g44'
   nexus-4-kk-ota:
     platforms:
       - b2g
     types:
       debug:
         task: tasks/builds/b2g_nexus_4_kk_ota_debug.yml
+        additional-parameters:
+          b2g_update_channel: 'nightly-b2g44'
   nexus-5l-ota:
     platforms:
       - b2g
     types:
       debug:
         task: tasks/builds/b2g_nexus_5l_ota_debug.yml
+        additional-parameters:
+          b2g_update_channel: 'nightly-b2g44'
 
 # Just needed for parser sake
-tests:
-  cppunit:
-    allowed_build_tasks:
-      tasks/builds/b2g_emulator_x86_kk_opt.yml:
-        task: tasks/tests/b2g_emulator_cpp_unit.yml
-      tasks/builds/b2g_emulator_x86_kk_debug.yml:
-        task: tasks/tests/b2g_emulator_cpp_unit.yml
+tests: []
--- a/testing/taskcluster/tasks/branches/mozilla-central/job_flags.yml
+++ b/testing/taskcluster/tasks/branches/mozilla-central/job_flags.yml
@@ -18,30 +18,40 @@ builds:
       opt:
         task: tasks/builds/android_api_11.yml
   aries-dogfood:
     platforms:
       - b2g
     types:
       opt:
         task: tasks/builds/b2g_aries_spark_dogfood.yml
+        additional-parameters:
+          b2g_update_channel: 'dogfood'
   aries-ota:
     platforms:
       - b2g
     types:
       opt:
-        task: tasks/builds/b2g_aries_spark_ota_opt.yml
+        task: tasks/builds/b2g_aries_spark_ota_balrog_opt.yml
+        additional-parameters:
+          b2g_update_channel: 'nightly'
       debug:
-        task: tasks/builds/b2g_aries_spark_ota_debug.yml
+        task: tasks/builds/b2g_aries_spark_ota_balrog_debug.yml
+        additional-parameters:
+          b2g_update_channel: 'nightly'
   flame-kk-ota:
     platforms:
       - b2g
     types:
       opt:
         task: tasks/builds/b2g_flame_kk_ota_opt.yml
+        additional-parameters:
+          b2g_update_channel: 'nightly'
       debug:
         task: tasks/builds/b2g_flame_kk_ota_debug.yml
+        additional-parameters:
+          b2g_update_channel: 'nightly'
 
 post-build:
   simulator:
     allowed_build_tasks:
       - tasks/builds/mulet_linux.yml
     task: tasks/post-builds/mulet_simulator.yml
--- a/testing/taskcluster/tasks/builds/b2g_aries_spark_dogfood.yml
+++ b/testing/taskcluster/tasks/builds/b2g_aries_spark_dogfood.yml
@@ -12,16 +12,17 @@ task:
   payload:
     cache:
       build-aries-spark-dogfood: /home/worker/workspace
       build-aries-spark-dogfood-objdir-gecko-{{project}}: /home/worker/objdir-gecko
     env:
       VARIANT: userdebug
       DOGFOOD: 1
       MOZHARNESS_CONFIG: b2g/taskcluster-spark-dogfood.py
+      B2G_UPDATE_CHANNEL: '{{b2g_update_channel}}'
   extra:
     treeherderEnv:
       - production
       - staging
     treeherder:
       symbol: B
       groupSymbol: Aries-DogFood
       groupName: Aries Device Image
new file mode 100644
--- /dev/null
+++ b/testing/taskcluster/tasks/builds/b2g_aries_spark_ota_balrog_debug.yml
@@ -0,0 +1,11 @@
+$inherits:
+  from: 'tasks/builds/b2g_aries_spark_ota_debug.yml'
+task:
+  scopes:
+    - 'docker-worker:feature:balrogVPNProxy'
+  payload:
+    features:
+      balrogVPNProxy: true
+    env:
+      MOZHARNESS_CONFIG: b2g/taskcluster-spark-ota-balrog.py
+
new file mode 100644
--- /dev/null
+++ b/testing/taskcluster/tasks/builds/b2g_aries_spark_ota_balrog_opt.yml
@@ -0,0 +1,10 @@
+$inherits:
+  from: 'tasks/builds/b2g_aries_spark_ota_opt.yml'
+task:
+  scopes:
+    - 'docker-worker:feature:balrogVPNProxy'
+  payload:
+    features:
+      balrogVPNProxy: true
+    env:
+      MOZHARNESS_CONFIG: b2g/taskcluster-spark-ota-balrog.py
--- a/testing/taskcluster/tasks/builds/b2g_aries_spark_ota_base.yml
+++ b/testing/taskcluster/tasks/builds/b2g_aries_spark_ota_base.yml
@@ -1,22 +1,19 @@
 $inherits:
   from: 'tasks/builds/b2g_phone_base.yml'
 task:
   workerType: balrog
-  scopes:
-    - 'docker-worker:feature:balrogVPNProxy'
 
   payload:
-    features:
-      balrogVPNProxy: true
     env:
       TARGET: 'aries'
       DEBUG: 0
       MOZHARNESS_CONFIG: b2g/taskcluster-spark-ota.py
+      B2G_UPDATE_CHANNEL: '{{b2g_update_channel}}'
     command:
       - >
         checkout-gecko workspace &&
         cd ./workspace/gecko/testing/taskcluster/scripts/phone-builder &&
         buildbot_step 'Build' ./build-phone-ota.sh $HOME/workspace
 
   extra:
     treeherder:
--- a/testing/taskcluster/tasks/builds/b2g_flame_kk_ota_base.yml
+++ b/testing/taskcluster/tasks/builds/b2g_flame_kk_ota_base.yml
@@ -1,18 +1,13 @@
 $inherits:
   from: 'tasks/builds/b2g_phone_base.yml'
 task:
   workerType: balrog
-  scopes:
-    - 'docker-worker:feature:balrogVPNProxy'
-
   payload:
-    features:
-      balrogVPNProxy: true
     env:
       TARGET: 'flame-kk'
       DEBUG: 0
     command:
       - >
         checkout-gecko workspace &&
         cd ./workspace/gecko/testing/taskcluster/scripts/phone-builder &&
         buildbot_step 'Build' ./build-phone-ota.sh $HOME/workspace
--- a/testing/taskcluster/tasks/builds/b2g_flame_kk_ota_debug.yml
+++ b/testing/taskcluster/tasks/builds/b2g_flame_kk_ota_debug.yml
@@ -13,16 +13,17 @@ task:
   payload:
     cache:
       build-flame-kk-ota-debug: /home/worker/workspace
       build-flame-kk-ota-debug-objdir-gecko-{{project}}: /home/worker/objdir-gecko
     env:
       VARIANT: userdebug
       B2G_DEBUG: 0
       MOZHARNESS_CONFIG: b2g/taskcluster-phone-fota.py
+      B2G_UPDATE_CHANNEL: '{{b2g_update_channel}}'
   extra:
     treeherderEnv:
       - staging
     treeherder:
       symbol: B
       groupSymbol: Flame-KK-OTA
       groupName:  Flame KitKat Device Image
       machine:
--- a/testing/taskcluster/tasks/builds/b2g_flame_kk_ota_opt.yml
+++ b/testing/taskcluster/tasks/builds/b2g_flame_kk_ota_opt.yml
@@ -12,16 +12,17 @@ task:
 
   payload:
     cache:
       build-flame-kk-ota-user: /home/worker/workspace
       build-flame-kk-ota-user-objdir-gecko-{{project}}: /home/worker/objdir-gecko
     env:
       VARIANT: user
       MOZHARNESS_CONFIG: b2g/taskcluster-phone-fota.py
+      B2G_UPDATE_CHANNEL: '{{b2g_update_channel}}'
   extra:
     treeherderEnv:
       - staging
     treeherder:
       symbol: B
       groupSymbol: Flame-KK-OTA
       groupName:  Flame KitKat Device Image
       machine:
--- a/testing/taskcluster/tasks/builds/b2g_nexus_4_kk_ota_debug.yml
+++ b/testing/taskcluster/tasks/builds/b2g_nexus_4_kk_ota_debug.yml
@@ -18,16 +18,17 @@ task:
     cache:
       build-nexus-4-kk-ota-debug: /home/worker/workspace
       build-nexus-4-kk-ota-debug-objdir-gecko-{{project}}: /home/worker/objdir-gecko
     env:
       VARIANT: userdebug
       B2G_DEBUG: 0
       TARGET: 'nexus-4-kk'
       DEBUG: 0
+      B2G_UPDATE_CHANNEL: '{{b2g_update_channel}}'
     command:
       - >
         checkout-gecko workspace &&
         cd ./workspace/gecko/testing/taskcluster/scripts/phone-builder &&
         buildbot_step 'Build' ./build-phone-ota.sh $HOME/workspace
   extra:
     locations:
       img: 'private/build/nexus-4-kk.zip'
--- a/testing/taskcluster/tasks/builds/b2g_nexus_5l_ota_debug.yml
+++ b/testing/taskcluster/tasks/builds/b2g_nexus_5l_ota_debug.yml
@@ -19,16 +19,17 @@ task:
       build-nexus-5l-ota-debug: /home/worker/workspace
       build-nexus-5l-ota-debug-objdir-gecko-{{project}}: /home/worker/objdir-gecko
     env:
       VARIANT: userdebug
       B2G_DEBUG: 0
       TARGET: 'nexus-5-l'
       DEBUG: 0
       MOZHARNESS_CONFIG: b2g/taskcluster-phone-fota.py
+      B2G_UPDATE_CHANNEL: '{{b2g_update_channel}}'
     command:
       - >
         checkout-gecko workspace &&
         cd ./workspace/gecko/testing/taskcluster/scripts/phone-builder &&
         buildbot_step 'Build' ./build-phone-ota.sh $HOME/workspace
   extra:
     locations:
       img: 'private/build/nexus-5-l.zip'