Bug 1195870 - Upload android multi apk to Taskcluster; r=jlund
authorMike Shal <mshal@mozilla.com>
Fri, 21 Aug 2015 08:28:53 -0400
changeset 259188 ec76ab89d043f92f9c09babb2f629cb41abe8d77
parent 259187 9861d5b754632b8cfc21a9b3d339398296bf190d
child 259189 f56c58238801ee4886bb4da3d64b33e729bead0f
push id29273
push userryanvm@gmail.com
push dateTue, 25 Aug 2015 14:44:17 +0000
treeherderautoland@23a04f9a321c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjlund
bugs1195870
milestone43.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 1195870 - Upload android multi apk to Taskcluster; r=jlund
testing/mozharness/mozharness/mozilla/building/buildbase.py
--- a/testing/mozharness/mozharness/mozilla/building/buildbase.py
+++ b/testing/mozharness/mozharness/mozilla/building/buildbase.py
@@ -15,16 +15,17 @@ import json
 import os
 import pprint
 import subprocess
 import time
 import uuid
 import copy
 import glob
 import logging
+import shlex
 from itertools import chain
 
 # import the power of mozharness ;)
 import sys
 from datetime import datetime
 import re
 from mozharness.base.config import BaseConfig, parse_config_file
 from mozharness.base.log import ERROR, OutputParser, FATAL
@@ -1666,16 +1667,17 @@ or run without that action (ie: --no-{ac
         vcs = self.config['compare_locales_vcs']
         abs_rev = self.vcs_checkout(repo=repo, dest=dest, revision=rev, vcs=vcs)
         self.set_buildbot_property('compare_locales_revision', abs_rev, write_to_file=True)
 
     def multi_l10n(self):
         if not self.query_is_nightly():
             self.info("Not a nightly build, skipping multi l10n.")
             return
+        self._initialize_taskcluster()
 
         self._checkout_compare_locales()
         dirs = self.query_abs_dirs()
         base_work_dir = dirs['base_work_dir']
         objdir = dirs['abs_obj_dir']
         branch = self.buildbot_config['properties']['branch']
 
         # Some android versions share the same .json config - if
@@ -1724,16 +1726,29 @@ or run without that action (ie: --no-{ac
         self.run_command_m(upload_cmd,
                            env=self.query_mach_build_env(multiLocale=False),
                            cwd=objdir, halt_on_failure=True,
                            output_parser=parser)
         for prop in parser.matches:
             self.set_buildbot_property(prop,
                                        parser.matches[prop],
                                        write_to_file=True)
+        upload_files_cmd = [
+            'make',
+            'echo-variable-UPLOAD_FILES',
+            'AB_CD=multi',
+        ]
+        output = self.get_output_from_command_m(
+            upload_files_cmd,
+            cwd=objdir,
+        )
+        files = shlex.split(output)
+        abs_files = [os.path.abspath(os.path.join(objdir, f)) for f in files]
+        self._taskcluster_upload(abs_files, self.routes_json['l10n'],
+                                 locale='multi')
 
     def postflight_build(self, console_output=True):
         """grabs properties from post build and calls ccache -s"""
         self.generate_build_props(console_output=console_output,
                                   halt_on_failure=True)
         if self.config.get('enable_ccache'):
             self._ccache_s()