Mercurial > hg
diff contrib/automation/hgautomation/cli.py @ 43057:c5c502bd1f70
automation: add a command to submit to a Try server
The CI code for running the Try Server requires more thorough review.
Let's add just the client-side bits for submitting to Try so others
can start using it.
Differential Revision: https://phab.mercurial-scm.org/D6983
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Sat, 05 Oct 2019 11:21:39 -0400 |
parents | b8df6a470bbb |
children | 2372284d9457 |
line wrap: on
line diff
--- 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