Bug 1236951 - Set script_repo_revision for ScriptFactory when archiver is used - r=kmoir
authorChris Cooper <ccooper@deadsquid.com>
Fri, 15 Jan 2016 11:52:32 -0500
changeset 4660 aa885f5cdbc30b2fc657f66f20a00fef43702588
parent 4657 089b94bab05c16c61b63571a563b073b4d4459a1
child 4661 bdaa07df6a1f40aca2d9b6fb3806487ae408fbaf
child 4662 e0ab5efe70827ebb0cfef3ec582d2d5ddab43c29
push id3913
push usercoop@mozilla.com
push dateFri, 15 Jan 2016 16:52:48 +0000
reviewerskmoir
bugs1236951
Bug 1236951 - Set script_repo_revision for ScriptFactory when archiver is used - r=kmoir
process/factory.py
--- a/process/factory.py
+++ b/process/factory.py
@@ -4436,18 +4436,20 @@ class ScriptFactory(RequestSortingBuildF
             property_name='script_repo_url',
             value=scriptRepo,
         ))
         script_repo_url = WithProperties('%(script_repo_url)s')
 
         if relengapi_archiver_repo_path:
             if relengapi_archiver_release_tag:
                 archiver_revision = "--tag %s " % relengapi_archiver_release_tag
+                script_repo_revision = relengapi_archiver_release_tag
             else:
                 archiver_revision = "--rev %s " % (relengapi_archiver_rev or '%(revision)s',)
+                script_repo_revision = "%s" % (relengapi_archiver_rev or '%(revision)s',)
             if self.script_repo_cache:
                 assert self.tools_repo_cache
                 archiver_client_path = \
                     os.path.join(self.tools_repo_cache,
                                  'buildfarm',
                                  'utils',
                                  'archiver_client.py')
             else:
@@ -4481,16 +4483,23 @@ class ScriptFactory(RequestSortingBuildF
                 log_eval_func=rc_eval_func({0: SUCCESS, None: EXCEPTION}),
                 haltOnFailure=True,
                 workdir=".",
             ))
             if scriptName.startswith('/'):
                 script_path = scriptName
             else:
                 script_path = 'scripts/%s' % scriptName
+            self.addStep(SetProperty(
+                name='get_script_repo_revision',
+                property='script_repo_revision',
+                command=['echo', script_repo_revision],
+                workdir=".",
+                haltOnFailure=False,
+            ))
         elif self.script_repo_cache:
             # all slaves bar win tests have a copy of hgtool on their path.
             # However, let's use runner's checkout version like we do for
             # script repo
             assert self.tools_repo_cache
             # ScriptFactory adds the props file into its env but we don't
             # want to pass that to the hgtool call because hgtool will assume
             # things like ['sourcestamp']['branch'] should be our branch