Bug 1242782 - release promotion mozharness l10n tasks should upload checksum and sigs r=jlund DONTBUILD
authorRail Aliiev <rail@mozilla.com>
Wed, 24 Feb 2016 10:12:11 -0800
changeset 285417 b9e59028b304
parent 285416 78d2fbf52588
child 285418 3614ca42d03e
push id30030
push usercbook@mozilla.com
push date2016-02-25 10:58 +0000
treeherdermozilla-central@c1e0d1890cfe [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjlund
bugs1242782
milestone47.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 1242782 - release promotion mozharness l10n tasks should upload checksum and sigs r=jlund DONTBUILD
testing/mozharness/scripts/desktop_l10n.py
--- a/testing/mozharness/scripts/desktop_l10n.py
+++ b/testing/mozharness/scripts/desktop_l10n.py
@@ -699,31 +699,33 @@ class DesktopSingleLocale(LocalesMixin, 
         if retval == SUCCESS:
             self.info('Upload successful (%s)' % locale)
             ret = SUCCESS
         else:
             self.error('failed to upload %s' % locale)
             ret = FAILURE
         return ret
 
-    def get_upload_files(self, locale):
+    def set_upload_files(self, locale):
         # The tree doesn't have a good way of exporting the list of files
         # created during locale generation, but we can grab them by echoing the
         # UPLOAD_FILES variable for each locale.
         env = self.query_l10n_env()
-        target = ['echo-variable-UPLOAD_FILES', 'AB_CD=%s' % (locale)]
+        target = ['echo-variable-UPLOAD_FILES', 'echo-variable-CHECKSUM_FILES',
+                  'AB_CD=%s' % locale]
         dirs = self.query_abs_dirs()
         cwd = dirs['abs_locales_dir']
         # Bug 1242771 - echo-variable-UPLOAD_FILES via mozharness fails when stderr is found
         #    we should ignore stderr as unfortunately it's expected when parsing for values
-        output = self._get_output_from_make(target=target, cwd=cwd, env=env, ignore_errors=True)
-        self.info('UPLOAD_FILES is "%s"' % (output))
+        output = self._get_output_from_make(target=target, cwd=cwd, env=env,
+                                            ignore_errors=True)
+        self.info('UPLOAD_FILES is "%s"' % output)
         files = shlex.split(output)
         if not files:
-            self.error('failed to get upload file list for locale %s' % (locale))
+            self.error('failed to get upload file list for locale %s' % locale)
             return FAILURE
 
         self.upload_files[locale] = [
             os.path.abspath(os.path.join(cwd, f)) for f in files
         ]
         return SUCCESS
 
     def make_installers(self, locale):
@@ -745,23 +747,27 @@ class DesktopSingleLocale(LocalesMixin, 
             self.error("compare locale %s failed" % (locale))
             return FAILURE
 
         # compare locale succeeded, run make installers
         if self.make_installers(locale) != SUCCESS:
             self.error("make installers-%s failed" % (locale))
             return FAILURE
 
-        if self.get_upload_files(locale):
-            self.error("failed to get list of files to upload for locale %s" % (locale))
-            return FAILURE
         # now try to upload the artifacts
         if self.make_upload(locale):
             self.error("make upload for locale %s failed!" % (locale))
             return FAILURE
+
+        # set_upload_files() should be called after make upload, to make sure
+        # we have all files in place (cheksums, etc)
+        if self.set_upload_files(locale):
+            self.error("failed to get list of files to upload for locale %s" % locale)
+            return FAILURE
+
         return SUCCESS
 
     def repack(self):
         """creates the repacks and udpates"""
         self._map(self.repack_locale, self.query_locales())
 
     def _query_objdir(self):
         """returns objdir name from configuration"""