contrib/automation/hgautomation/cli.py
changeset 43057 c5c502bd1f70
parent 43055 b8df6a470bbb
child 43076 2372284d9457
--- a/contrib/automation/hgautomation/cli.py	Sat Oct 05 11:58:17 2019 -0400
+++ b/contrib/automation/hgautomation/cli.py	Sat Oct 05 11:21:39 2019 -0400
@@ -17,6 +17,7 @@
     aws,
     HGAutomation,
     linux,
+    try_server,
     windows,
 )
 
@@ -193,6 +194,11 @@
                               ssh_username=ssh_username)
 
 
+def run_try(hga: HGAutomation, aws_region: str, rev: str):
+    c = hga.aws_connection(aws_region, ensure_ec2_state=False)
+    try_server.trigger_try(c, rev=rev)
+
+
 def get_parser():
     parser = argparse.ArgumentParser()
 
@@ -439,6 +445,15 @@
     )
     sp.set_defaults(func=publish_windows_artifacts)
 
+    sp = subparsers.add_parser(
+        'try',
+        help='Run CI automation against a custom changeset'
+    )
+    sp.add_argument('-r', '--rev',
+                    default='.',
+                    help='Revision to run CI on')
+    sp.set_defaults(func=run_try)
+
     return parser