Skip to content
This repository has been archived by the owner on Sep 15, 2021. It is now read-only.

Commit

Permalink
Bug 671450 - Use buildid and rev to create tinderbox-builds path - r=aki
Browse files Browse the repository at this point in the history
  • Loading branch information
ccooper committed Dec 2, 2011
1 parent 92dca35 commit 87fbd6c
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions stage/post_upload.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,10 +159,16 @@ def ReleaseToBuildDir(builds_dir, builds_url, options, upload_dir, files, dated)
tinderboxUrl = builds_url % \
{'product': options.product,
'tinderbox_builds_dir': options.tinderbox_builds_dir}
tinderboxBuildsPathOld = None
if dated:
# Bug 671450 - tinderboxBuildsPathOld can be retired after having
# 1 month of builds in the new tinderboxBuildsPath, provided corresponding
# log lookup changes have been made to TBPL.
buildid = str(BuildIDToUnixTime(options.buildid))
tinderboxBuildsPath = os.path.join(tinderboxBuildsPath, buildid)
tinderboxUrl = os.path.join(tinderboxUrl, buildid)
tinderboxBuildsPathOld = os.path.join(tinderboxBuildsPath, buildid)
buildid_dir = "%s-%s" % (str(options.buildid),options.revision)
tinderboxBuildsPath = os.path.join(tinderboxBuildsPath, buildid_dir)
tinderboxUrl = os.path.join(tinderboxUrl, buildid_dir)
if options.builddir:
tinderboxBuildsPath = os.path.join(tinderboxBuildsPath, options.builddir)
tinderboxUrl = os.path.join(tinderboxUrl, options.builddir)
Expand All @@ -179,6 +185,11 @@ def ReleaseToBuildDir(builds_dir, builds_url, options, upload_dir, files, dated)
else:
CopyFileToDir(f, upload_dir, tinderboxBuildsPath)
sys.stderr.write("%s\n" % os.path.join(tinderboxUrl, os.path.basename(f)))
# Bug 671450 - see above fore removal criteria
# Must also check whether the old directory structure has already been
# created. Mobile repacks upload in two stages.
if tinderboxBuildsPathOld and not os.path.exists(tinderboxBuildsPathOld):
os.symlink(tinderboxBuildsPath, tinderboxBuildsPathOld)
os.utime(tinderboxBuildsPath, None)

def ReleaseToTinderboxBuilds(options, upload_dir, files, dated=True):
Expand Down

0 comments on commit 87fbd6c

Please sign in to comment.