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 304342 6ea255f3b230141ceb659db43317562150576dc2
parent 304341 944021d602d9846aa89688b50959b669efcabe04
child 304343 8654f7d44bf91455e4b8fa23386af6c26d9cf8fa
push id9175
push userraliiev@mozilla.com
push dateThu, 03 Mar 2016 03:39:52 +0000
treeherdermozilla-aurora@0bee186afe5a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjlund
bugs1242782
milestone46.0a2
Bug 1242782 - release promotion mozharness l10n tasks should upload checksum and sigs r=jlund DONTBUILD MozReview-Commit-ID: 4RRqaA5eKKq
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"""