Bug 1231318: pass MOZ_BUILD_DATE to builds based on pushdate; r=jlund
authorDustin J. Mitchell <dustin@mozilla.com>
Thu, 28 Jan 2016 19:59:31 +0000
changeset 282582 c337204b80ad4f3da051a3037808891c5a3c2269
parent 282581 b451c824ecc1fb2f0885babcedb9b190b6f84e56
child 282583 8eeb8603b17a97ef1699409a9146b9e912094ca7
push id17362
push usercbook@mozilla.com
push dateTue, 02 Feb 2016 10:54:53 +0000
treeherderfx-team@e5f1b4782e38 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjlund
bugs1231318
milestone47.0a1
Bug 1231318: pass MOZ_BUILD_DATE to builds based on pushdate; r=jlund
testing/mozharness/mozharness/mozilla/building/buildbase.py
testing/taskcluster/tasks/build.yml
--- a/testing/mozharness/mozharness/mozilla/building/buildbase.py
+++ b/testing/mozharness/mozharness/mozilla/building/buildbase.py
@@ -767,16 +767,21 @@ or run without that action (ie: --no-{ac
 
         buildid = None
         if c.get("is_automation"):
             if self.buildbot_config['properties'].get('buildid'):
                 self.info("Determining buildid from buildbot properties")
                 buildid = self.buildbot_config['properties']['buildid'].encode(
                     'ascii', 'replace'
                 )
+            else:
+                # for taskcluster, there are no buildbot properties, and we pass
+                # MOZ_BUILD_DATE into mozharness as an environment variable, only
+                # to have it pass the same value out with the same name.
+                buildid = os.environ.get('MOZ_BUILD_DATE')
 
         if not buildid:
             self.info("Creating buildid through current time")
             buildid = generate_build_ID()
 
         if c.get('is_automation'):
             self.set_buildbot_property('buildid',
                                        buildid,
--- a/testing/taskcluster/tasks/build.yml
+++ b/testing/taskcluster/tasks/build.yml
@@ -43,16 +43,17 @@ task:
     env:
       # Common environment variables for checking out gecko
       GECKO_BASE_REPOSITORY: '{{base_repository}}'
       GECKO_HEAD_REPOSITORY: '{{head_repository}}'
       GECKO_HEAD_REV: '{{head_rev}}'
       GECKO_HEAD_REF: '{{head_ref}}'
       TOOLTOOL_REPO: 'https://git.mozilla.org/build/tooltool.git'
       TOOLTOOL_REV: 'master'
+      MOZ_BUILD_DATE: '{{pushdate}}'
 
   extra:
     build_product: '{{build_product}}'
     build_name: '{{build_name}}'
     build_type: '{{build_type}}'
     index:
       rank: {{pushlog_id}}
     treeherder: