bug 1433488 - auto-push firefox betas > b2. r?rail draft
authorAki Sasaki <asasaki@mozilla.com>
Thu, 22 Feb 2018 14:00:04 +0000
changeset 8562 3d2d6b9e6a0a13d9392499411d1feea5577499f1
parent 8560 2d25a7e6aa2070515c431b3213c8bdd974e23364
push id281
push userasasaki@mozilla.com
push dateThu, 22 Feb 2018 14:45:51 +0000
reviewersrail
bugs1433488
bug 1433488 - auto-push firefox betas > b2. r?rail MozReview-Commit-ID: 1Crpz8jJCoh
buildfarm/release/release-runner3.py
--- a/buildfarm/release/release-runner3.py
+++ b/buildfarm/release/release-runner3.py
@@ -115,16 +115,21 @@ def is_rc(release):
 
 
 def get_beta_num(version):
     if is_beta(version):
         parts = version.split('b')
         return int(parts[-1])
 
 
+def should_auto_push(release):
+    return release['product'] in ('devedition', 'firefox') and is_beta(release['version']) \
+        and get_beta_num(release['version']) > 2
+
+
 def main(options):
     log.info('Loading config from %s' % options.config)
 
     with open(options.config, 'r') as config_file:
         config = yaml.load(config_file)
 
     if config['release-runner'].get('verbose', False):
         log_level = logging.DEBUG
@@ -207,16 +212,18 @@ def main(options):
                     # XXX The current plan is to run promote_firefox_rc, then
                     # ship_firefox_rc, then push_firefox, then ship_firefox.
                     # We need to support this workflow. However, rr3 doesn't
                     # support anything more than the first action task yet,
                     # so this isn't a missing feature for RCs specifically.
                     action_task_input["release_promotion_flavor"] = "{}_rc".format(
                         action_task_input["release_promotion_flavor"]
                     )
+                elif should_auto_push(release):
+                    action_task_input["release_promotion_flavor"] = "push_{}".format(release["product"])
             action_task_id, action_task = generate_action_task(
                 project=release["branchShortName"],
                 revision=release["mozillaRevision"],
                 action_task_input=action_task_input,
             )
             submit_action_task(queue=queue, action_task_id=action_task_id,
                                action_task=action_task)
             rr.mark_as_completed(release)