Skip to content

Commit

Permalink
buildextend: Pass through ore's --grant-user
Browse files Browse the repository at this point in the history
So a separate CI account can do testing before making it public
for example.
  • Loading branch information
cgwalters authored and jlebon committed Oct 30, 2018
1 parent eebc529 commit 773b59a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/cmd-buildextend-ec2
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 773b59a

Please sign in to comment.