Bug 1303214 - Change Mozharness Taskcluster artifact expiration to 28 days draft
authorBrian Stack <bstack@mozilla.com>
Mon, 17 Oct 2016 15:41:30 -0700
changeset 426147 204ceaf83711874ce69eaf0f5717b91d52127c3c
parent 426129 6c3893afbb49689920d3189e1c5320867d3b3c97
child 534109 b08e7a3e6971c6461e8019d248d7b383c2dacf67
push id32634
push userbstack@mozilla.com
push dateMon, 17 Oct 2016 22:47:01 +0000
bugs1303214
milestone52.0a1
Bug 1303214 - Change Mozharness Taskcluster artifact expiration to 28 days MozReview-Commit-ID: BbWaeqXIRWT
testing/mozharness/mozharness/mozilla/taskcluster_helper.py
--- a/testing/mozharness/mozharness/mozilla/taskcluster_helper.py
+++ b/testing/mozharness/mozharness/mozilla/taskcluster_helper.py
@@ -88,17 +88,20 @@ class Taskcluster(LogMixin):
             ".txt": "text/plain",
             ".xpi": "application/x-xpinstall",
             ".zip": "application/zip",
         }
         return mime_types.get(ext, default)
 
     @property
     def expiration(self):
-        return datetime.utcnow() + timedelta(weeks=52)
+        weeks = 52
+        if self.buildbot == 'buildbot-try':
+            weeks = 3
+        return datetime.utcnow() + timedelta(weeks=weeks)
 
     def create_artifact(self, task, filename):
         mime_type = self.get_mime_type(os.path.splitext(filename)[1])
         content_length = os.path.getsize(filename)
         self.info("Uploading to S3: filename=%s mimetype=%s length=%s" % (
             filename, mime_type, content_length))
         # reclaim the task to avoid "claim-expired" errors
         self.taskcluster_queue.reclaimTask(