Skip to content

Commit 6e53b21

Browse files
chore(CI): Run CodeBuild CI from GHA (#725)
1 parent 9aa22c3 commit 6e53b21

File tree

3 files changed

+75
-1
lines changed

3 files changed

+75
-1
lines changed
+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: AWS CodeBuild CI
2+
3+
on:
4+
pull_request:
5+
push:
6+
# Run once a day
7+
schedule:
8+
- cron: "0 0 * * *"
9+
10+
permissions:
11+
id-token: write
12+
contents: read
13+
14+
jobs:
15+
codebuild-tests:
16+
name: AWS CodeBuild CI
17+
runs-on: ubuntu-latest
18+
strategy:
19+
matrix:
20+
python:
21+
- python_version: "38"
22+
image: "aws/codebuild/standard:5.0"
23+
- python_version: "39"
24+
image: "aws/codebuild/standard:5.0"
25+
- python_version: "310"
26+
image: "aws/codebuild/standard:6.0"
27+
- python_version: "311"
28+
image: "aws/codebuild/standard:7.0"
29+
- python_version: "312"
30+
image: "aws/codebuild/standard:7.0"
31+
codebuild_file_name:
32+
- "awses_local.yml"
33+
- "examples.yml"
34+
- "integ.yml"
35+
steps:
36+
- name: Configure AWS Credentials
37+
uses: aws-actions/configure-aws-credentials@v2
38+
with:
39+
role-to-assume: ${{ secrets.CI_AWS_ROLE_ARN }}
40+
aws-region: us-west-2
41+
role-duration-seconds: 3600
42+
- name: Run python-${{ matrix.python.python_version }} ${{ matrix.codebuild_file_name }}
43+
uses: aws-actions/aws-codebuild-run-build@v1
44+
timeout-minutes: 60
45+
with:
46+
project-name: python-esdk
47+
buildspec-override: codebuild/py${{ matrix.python.python_version }}/${{ matrix.codebuild_file_name }}
48+
image-override: ${{ matrix.python.image }}

buildspec.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ batch:
2424
buildspec: codebuild/py39/examples.yml
2525
env:
2626
image: aws/codebuild/standard:5.0
27-
- identifier: py39_awses_latest
27+
- identifier: py39_awses_local
28+
buildspec: codebuild/py39/awses_local.yml
2829
env:
2930
image: aws/codebuild/standard:5.0
3031

codebuild/py39/awses_local.yml

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
version: 0.2
2+
3+
env:
4+
variables:
5+
TOXENV: "py39-awses_local"
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+
AWS_ENCRYPTION_SDK_PYTHON_INTEGRATION_TEST_AWS_KMS_MRK_KEY_ID_1: >-
11+
arn:aws:kms:us-west-2:658956600833:key/mrk-80bd8ecdcd4342aebd84b7dc9da498a7
12+
AWS_ENCRYPTION_SDK_PYTHON_INTEGRATION_TEST_AWS_KMS_MRK_KEY_ID_2: >-
13+
arn:aws:kms:us-east-1:658956600833:key/mrk-80bd8ecdcd4342aebd84b7dc9da498a7
14+
AWS_ENCRYPTION_SDK_PYTHON_DECRYPT_ORACLE_API_DEPLOYMENT_ID: "xi1mwx3ttb"
15+
AWS_ENCRYPTION_SDK_PYTHON_DECRYPT_ORACLE_REGION: "us-west-2"
16+
17+
phases:
18+
install:
19+
runtime-versions:
20+
python: 3.9
21+
build:
22+
commands:
23+
- pip install "tox < 4.0"
24+
- cd test_vector_handlers
25+
- tox

0 commit comments

Comments
 (0)