Skip to content

Commit

Permalink
Use python3
Browse files Browse the repository at this point in the history
  • Loading branch information
justsmth committed Jan 19, 2024
1 parent 1fdfb39 commit 6b8797f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
6 changes: 1 addition & 5 deletions tests/ci/cdk/cdk/aws_lc_ec2_test_framework_ci_stack.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,14 +84,10 @@ def __init__(self,
iam.ManagedPolicy.from_aws_managed_policy_name("AmazonSSMManagedInstanceCore"),
iam.ManagedPolicy.from_aws_managed_policy_name("CloudWatchAgentServerPolicy")
])
cfn_instance_prof = iam.CfnInstanceProfile(scope=self, id="{}-ec2-profile".format(id),
iam.CfnInstanceProfile(scope=self, id="{}-ec2-profile".format(id),
roles=["{}-ec2-role".format(id)],
instance_profile_name="{}-ec2-profile".format(id))

cfn_ec2_role = iam.CfnRole( self, "CfnEc2Role",
assume_role_policy_document=ec2_role.assume_role_policy
)
cfn_instance_prof.add_depends_on(cfn_ec2_role)
# create vpc for ec2s
vpc = ec2.Vpc(self, id="{}-ec2-vpc".format(id))
selection = vpc.select_subnets()
Expand Down
6 changes: 3 additions & 3 deletions tests/ci/cdk/run-cdk.sh
Original file line number Diff line number Diff line change
Expand Up @@ -222,19 +222,19 @@ function create_android_resources() {
# TODO: Move resource creation to aws cdk when cdk has support for device form resource constructs.
# Issue: https://github.com/aws/aws-cdk/issues/17893
DEVICEFARM_PROJECT=`aws devicefarm create-project --name aws-lc-android-ci | \
python -c 'import json,sys;obj=json.load(sys.stdin);print(obj["project"]["arn"])'`
python3 -c 'import json,sys;obj=json.load(sys.stdin);print(obj["project"]["arn"])'`

DEVICEFARM_DEVICE_POOL=`aws devicefarm create-device-pool --project-arn ${DEVICEFARM_PROJECT} \
--name "aws-lc-device-pool" \
--description "AWS-LC Device Pool" \
--rules file://../android/devicepool_rules.json --max-devices 2 | \
python -c 'import json,sys;obj=json.load(sys.stdin);print(obj["devicePool"]["arn"])'`
python3 -c 'import json,sys;obj=json.load(sys.stdin);print(obj["devicePool"]["arn"])'`

DEVICEFARM_DEVICE_POOL_FIPS=`aws devicefarm create-device-pool --project-arn ${DEVICEFARM_PROJECT} \
--name "aws-lc-device-pool-fips" \
--description "AWS-LC FIPS Device Pool" \
--rules file://../android/devicepool_rules_fips.json --max-devices 2 | \
python -c 'import json,sys;obj=json.load(sys.stdin);print(obj["devicePool"]["arn"])'`
python3 -c 'import json,sys;obj=json.load(sys.stdin);print(obj["devicePool"]["arn"])'`

cat <<EOF
Expand Down

0 comments on commit 6b8797f

Please sign in to comment.