Bug 1269731 - partner-repacks push to mirrors should work on reruns r=nthomas a=release DONTBUILD draft
authorRail Aliiev <rail@mozilla.com>
Mon, 16 May 2016 23:34:53 -0400
changeset 367638 2c7143f3b6a5e49a31406c9c038f846373f5148f
parent 367637 44f718bb2282512003fa09eb9a796ff4b580c957
child 521066 da7ad1226867a54a0d5e005457c3ce963d73732b
push id18303
push userbmo:rail@mozilla.com
push dateTue, 17 May 2016 03:37:33 +0000
reviewersnthomas, release
bugs1269731
milestone49.0a1
Bug 1269731 - partner-repacks push to mirrors should work on reruns r=nthomas a=release DONTBUILD MozReview-Commit-ID: 3LsXn8q5QDA
testing/mozharness/scripts/release/push-candidate-to-releases.py
--- a/testing/mozharness/scripts/release/push-candidate-to-releases.py
+++ b/testing/mozharness/scripts/release/push-candidate-to-releases.py
@@ -30,19 +30,35 @@ class ReleasePusher(BaseScript, Virtuale
             "help": "Bucket to copy files from candidates/ to releases/",
         }],
         [["--credentials"], {
             "dest": "credentials",
             "help": "File containing access key and secret access key",
         }],
         [["--exclude"], {
             "dest": "excludes",
-            "default": [],
+            "default": [
+                r"^.*tests.*$",
+                r"^.*crashreporter.*$",
+                r"^.*[^k]\.zip(\.asc)?$",
+                r"^.*\.log$",
+                r"^.*\.txt$",
+                r"^.*/partner-repacks.*$",
+                r"^.*.checksums(\.asc)?$",
+                r"^.*/logs/.*$",
+                r"^.*/jsshell.*$",
+                r"^.*json$",
+                r"^.*/host.*$",
+                r"^.*/mar-tools/.*$",
+                r"^.*robocop.apk$",
+                r"^.*contrib.*",
+                r"^.*/beetmover-checksums/.*$",
+            ],
             "action": "append",
-            "help": "List of patterns to exclude from copy. See script source for default.",
+            "help": "List of patterns to exclude from copy.",
         }],
         [["-j", "--parallelization"], {
             "dest": "parallelization",
             "default": 20,
             "type": "int",
             "help": "Number of copy requests to run concurrently",
         }],
     ] + virtualenv_config_options
@@ -80,40 +96,16 @@ class ReleasePusher(BaseScript, Virtuale
         if all(aws_creds):
             self.aws_key_id, self.aws_secret_key = aws_creds
         else:  # use
             self.aws_key_id, self.aws_secret_key = None, None
             # set the env var for boto to read our special config file
             # rather than anything else we have at ~/.boto
             os.environ["BOTO_CONFIG"] = os.path.abspath(self.config["credentials"])
 
-    def _pre_config_lock(self, rw_config):
-        super(ReleasePusher, self)._pre_config_lock(rw_config)
-
-        # This default is set here rather in the config because default
-        # lists cannot be completely overidden, only appended to.
-        if not self.config.get("excludes"):
-            self.config["excludes"] = [
-                r"^.*tests.*$",
-                r"^.*crashreporter.*$",
-                r"^.*[^k]\.zip(\.asc)?$",
-                r"^.*\.log$",
-                r"^.*\.txt$",
-                r"^.*/partner-repacks.*$",
-                r"^.*.checksums(\.asc)?$",
-                r"^.*/logs/.*$",
-                r"^.*/jsshell.*$",
-                r"^.*json$",
-                r"^.*/host.*$",
-                r"^.*/mar-tools/.*$",
-                r"^.*robocop.apk$",
-                r"^.*contrib.*",
-                r"^.*/beetmover-checksums/.*$",
-            ]
-
     def _get_candidates_prefix(self):
         return "pub/{}/candidates/{}-candidates/build{}/".format(
             self.config['product'],
             self.config["version"],
             self.config["build_number"]
         )
 
     def _get_releases_prefix(self):