From 773b59a360b5449962bfa3b4abf87fdfec3415c5 Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Tue, 30 Oct 2018 16:25:48 +0000 Subject: [PATCH] buildextend: Pass through ore's --grant-user So a separate CI account can do testing before making it public for example. --- src/cmd-buildextend-ec2 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/cmd-buildextend-ec2 b/src/cmd-buildextend-ec2 index 4a925df97c..5449a63c61 100755 --- a/src/cmd-buildextend-ec2 +++ b/src/cmd-buildextend-ec2 @@ -16,6 +16,8 @@ parser.add_argument("--region", help="EC2 region", required=True) parser.add_argument("--bucket", help="S3 Bucket", required=True) +parser.add_argument("--grant-user", help="Grant user launch permission", + nargs="*", default=[]) args = parser.parse_args() with open('src/config/manifest.yaml') as f: @@ -57,6 +59,8 @@ def run_ore(): '--ami-description', f"{manifest['rojig']['summary']} {args.build}", '--file', tmp_img_ec2_vmdk, '--delete-object'] + for user in args.grant_user: + ore_args.extend(['--grant-user', user]) print("+ {}".format(subprocess.list2cmdline(ore_args))) ore_data = json.loads(subprocess.check_output(ore_args)) shutil.rmtree(tmpdir)