Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit cba7d94

Browse files
committedDec 17, 2020
chore: Add AWS CodeBuild buildspec
Adding buildspec to batch build multiple Python runtimes * Python 2.7 * Python 3.5 * Python 3.6 * Python 3.7 * Python 3.8
1 parent d610e0b commit cba7d94

File tree

7 files changed

+111
-0
lines changed

7 files changed

+111
-0
lines changed
 

‎buildspec.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
version: 0.2
2+
3+
batch:
4+
fast-fail: false
5+
build-list:
6+
- identifier: python2_7
7+
buildspec: codebuild/python2.7.yml
8+
- identifier: python3_5
9+
buildspec: codebuild/python3.5.yml
10+
- identifier: python3_6
11+
buildspec: codebuild/python3.6.yml
12+
- identifier: python3_7
13+
buildspec: codebuild/python3.7.yml
14+
- identifier: python3_8
15+
buildspec: codebuild/python3.8.yml

‎codebuild/python2.7.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
version: 0.2
2+
3+
env:
4+
variables:
5+
TOXENV: "py27-integ-slow"
6+
AWS_ENCRYPTION_SDK_PYTHON_INTEGRATION_TEST_AWS_KMS_KEY_ID: >-
7+
arn:aws:kms:us-west-2:658956600833:key/b3537ef1-d8dc-4780-9f5a-55776cbb2f7f
8+
AWS_ENCRYPTION_SDK_PYTHON_INTEGRATION_TEST_AWS_KMS_KEY_ID_2: >-
9+
arn:aws:kms:eu-central-1:658956600833:key/75414c93-5285-4b57-99c9-30c1cf0a22c2
10+
11+
phases:
12+
install:
13+
runtime-versions:
14+
python: latest
15+
build:
16+
commands:
17+
- pip install tox
18+
- tox

‎codebuild/python3.5.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
version: 0.2
2+
3+
env:
4+
variables:
5+
TOXENV: "py35-integ-slow"
6+
AWS_ENCRYPTION_SDK_PYTHON_INTEGRATION_TEST_AWS_KMS_KEY_ID: >-
7+
arn:aws:kms:us-west-2:658956600833:key/b3537ef1-d8dc-4780-9f5a-55776cbb2f7f
8+
AWS_ENCRYPTION_SDK_PYTHON_INTEGRATION_TEST_AWS_KMS_KEY_ID_2: >-
9+
arn:aws:kms:eu-central-1:658956600833:key/75414c93-5285-4b57-99c9-30c1cf0a22c2
10+
11+
phases:
12+
install:
13+
runtime-versions:
14+
python: latest
15+
build:
16+
commands:
17+
- pyenv install 3.5.9
18+
- pyenv local 3.5.9
19+
- pip install tox tox-pyenv
20+
- tox

‎codebuild/python3.6.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
version: 0.2
2+
3+
env:
4+
variables:
5+
TOXENV: "py36-integ-slow"
6+
AWS_ENCRYPTION_SDK_PYTHON_INTEGRATION_TEST_AWS_KMS_KEY_ID: >-
7+
arn:aws:kms:us-west-2:658956600833:key/b3537ef1-d8dc-4780-9f5a-55776cbb2f7f
8+
AWS_ENCRYPTION_SDK_PYTHON_INTEGRATION_TEST_AWS_KMS_KEY_ID_2: >-
9+
arn:aws:kms:eu-central-1:658956600833:key/75414c93-5285-4b57-99c9-30c1cf0a22c2
10+
11+
phases:
12+
install:
13+
runtime-versions:
14+
python: latest
15+
build:
16+
commands:
17+
- pip install tox
18+
- tox

‎codebuild/python3.7.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
version: 0.2
2+
3+
env:
4+
variables:
5+
TOXENV: "py37-integ-slow"
6+
AWS_ENCRYPTION_SDK_PYTHON_INTEGRATION_TEST_AWS_KMS_KEY_ID: >-
7+
arn:aws:kms:us-west-2:658956600833:key/b3537ef1-d8dc-4780-9f5a-55776cbb2f7f
8+
AWS_ENCRYPTION_SDK_PYTHON_INTEGRATION_TEST_AWS_KMS_KEY_ID_2: >-
9+
arn:aws:kms:eu-central-1:658956600833:key/75414c93-5285-4b57-99c9-30c1cf0a22c2
10+
11+
phases:
12+
install:
13+
runtime-versions:
14+
python: latest
15+
build:
16+
commands:
17+
- pyenv install 3.7.9
18+
- pyenv local 3.7.9
19+
- pip install tox tox-pyenv
20+
- tox

‎codebuild/python3.8.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
version: 0.2
2+
3+
env:
4+
variables:
5+
TOXENV: "py38-integ-slow"
6+
AWS_ENCRYPTION_SDK_PYTHON_INTEGRATION_TEST_AWS_KMS_KEY_ID: >-
7+
arn:aws:kms:us-west-2:658956600833:key/b3537ef1-d8dc-4780-9f5a-55776cbb2f7f
8+
AWS_ENCRYPTION_SDK_PYTHON_INTEGRATION_TEST_AWS_KMS_KEY_ID_2: >-
9+
arn:aws:kms:eu-central-1:658956600833:key/75414c93-5285-4b57-99c9-30c1cf0a22c2
10+
11+
phases:
12+
install:
13+
runtime-versions:
14+
python: latest
15+
build:
16+
commands:
17+
- pip install tox
18+
- tox

‎tox.ini

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ passenv =
4646
DDB_ENCRYPTION_CLIENT_TEST_TABLE_NAME \
4747
# Pass through AWS credentials
4848
AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY AWS_SESSION_TOKEN \
49+
# AWS Role access in CodeBuild is via the contaner URI
50+
AWS_CONTAINER_CREDENTIALS_RELATIVE_URI \
4951
# Pass through AWS profile name (useful for local testing)
5052
AWS_PROFILE \
5153
# Pass through the default AWS region (used for integration tests)

0 commit comments

Comments
 (0)
Please sign in to comment.