1+ version : 0.2 
2+ 
3+ env :
4+   variables :
5+     #  Default VERSION if not provided externally
6+     VERSION : 4.0.2 
7+     REGION : " us-west-2" 
8+     AWS_ENCRYPTION_SDK_PYTHON_INTEGRATION_TEST_AWS_KMS_KEY_ID : >- 
9+       arn:aws:kms:us-west-2:658956600833:key/b3537ef1-d8dc-4780-9f5a-55776cbb2f7f 
10+      AWS_ENCRYPTION_SDK_PYTHON_INTEGRATION_TEST_AWS_KMS_KEY_ID_2 : >- 
11+       arn:aws:kms:eu-central-1:658956600833:key/75414c93-5285-4b57-99c9-30c1cf0a22c2 
12+      AWS_ENCRYPTION_SDK_PYTHON_INTEGRATION_TEST_AWS_KMS_MRK_KEY_ID_1 : >- 
13+       arn:aws:kms:us-west-2:658956600833:key/mrk-80bd8ecdcd4342aebd84b7dc9da498a7 
14+      AWS_ENCRYPTION_SDK_PYTHON_INTEGRATION_TEST_AWS_KMS_MRK_KEY_ID_2 : >- 
15+       arn:aws:kms:us-east-1:658956600833:key/mrk-80bd8ecdcd4342aebd84b7dc9da498a7 
16+ 
17+ phases :
18+   install :
19+     runtime-versions :
20+       python : 3.11 
21+     commands :
22+       - pip install "tox < 4.0" 
23+       - pip install --upgrade pip 
24+       - echo "Installing aws-encryption-sdk version $VERSION" 
25+       - pip install "aws-encryption-sdk[MPL]==$VERSION" 
26+   build :
27+     commands :
28+       #  Verify installation
29+       - python -c "import aws_encryption_sdk; print(f'Using aws-encryption-sdk version : {aws_encryption_sdk.__version__}')" 
30+       
31+       #  Set initial retry count
32+       - NUM_RETRIES=3 
33+       
34+       #  Run non-MPL-specific tests with the MPL installed
35+       - | 
36+         echo "Running standard examples" 
37+         while [ $NUM_RETRIES -gt 0 ] 
38+         do 
39+           tox -e validate-pypi-release -- $VERSION 
40+           if [ $? -eq 0 ]; then 
41+             echo "Standard examples successful" 
42+             break 
43+           fi 
44+           NUM_RETRIES=$((NUM_RETRIES-1)) 
45+           if [ $NUM_RETRIES -eq 0 ]; then 
46+             echo "All standard example attempts failed, stopping" 
47+             exit 1 
48+           else 
49+             echo "Standard examples failed, retrying in 60 seconds; will retry $NUM_RETRIES more times" && sleep 60 
50+           fi 
51+         done 
52+        
53+        #  Assume special role for MPL-specific tests
54+       - echo "Running tests with special role for MPL features" 
55+       - TMP_ROLE=$(aws sts assume-role --role-arn "arn:aws:iam::370957321024:role/GitHub-CI-Public-ESDK-Python-Role-us-west-2" --role-session-name "CB-ValidateReleased") 
56+       - export TMP_ROLE 
57+       - export AWS_ACCESS_KEY_ID=$(echo "${TMP_ROLE}" | jq -r '.Credentials.AccessKeyId') 
58+       - export AWS_SECRET_ACCESS_KEY=$(echo "${TMP_ROLE}" | jq -r '.Credentials.SecretAccessKey') 
59+       - export AWS_SESSION_TOKEN=$(echo "${TMP_ROLE}" | jq -r '.Credentials.SessionToken') 
60+       - aws sts get-caller-identity 
61+       
62+       #  Run MPL examples with a fresh retry count
63+       - NUM_RETRIES=3 
64+       - | 
65+         echo "Running MPL examples" 
66+         while [ $NUM_RETRIES -gt 0 ] 
67+         do 
68+           tox -e validate-pypi-release-mpl -- $VERSION 
69+           if [ $? -eq 0 ]; then 
70+             echo "MPL examples successful" 
71+             break 
72+           fi 
73+           NUM_RETRIES=$((NUM_RETRIES-1)) 
74+           if [ $NUM_RETRIES -eq 0 ]; then 
75+             echo "All MPL example attempts failed, stopping" 
76+             exit 1 
77+           else 
78+             echo "MPL examples failed, retrying in 60 seconds; will retry $NUM_RETRIES more times" && sleep 60 
79+           fi 
80+         done 
0 commit comments