mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-26 20:30:41 +00:00
Bug 1337861 - [Fennec-Relpro] Enforce the presence of $MOZ_BUILD_DATE r=jlund
MozReview-Commit-ID: DzEeeYQjwLW --HG-- extra : rebase_source : 78e57dee284f00302fc30cf93f57b5fa748049c9
This commit is contained in:
parent
448e3bd38a
commit
d0791aa9fe
@ -795,16 +795,27 @@ or run without that action (ie: --no-{action})"
|
||||
|
||||
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'
|
||||
)
|
||||
if self.buildbot_config.get('properties'):
|
||||
# We're on buildbot
|
||||
if self.buildbot_config.get('properties').get('buildid'):
|
||||
# Try may not provide a buildid. This means, it's gonna be generated
|
||||
# below.
|
||||
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
|
||||
# We're on taskcluster.
|
||||
# In this case, there are no buildbot properties, and we must 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')
|
||||
try:
|
||||
buildid = os.environ['MOZ_BUILD_DATE']
|
||||
except KeyError:
|
||||
self.fatal(
|
||||
"MOZ_BUILD_DATE must be provided as an environment var on Taskcluster"
|
||||
)
|
||||
|
||||
|
||||
if not buildid:
|
||||
self.info("Creating buildid through current time")
|
||||
|
Loading…
x
Reference in New Issue
Block a user