Skip to content

Commit

Permalink
added 3.12, removed 3.9
Browse files Browse the repository at this point in the history
  • Loading branch information
keithrozario committed Jan 2, 2024
1 parent b2564e1 commit eb77c3b
Show file tree
Hide file tree
Showing 12 changed files with 122 additions and 191 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/container_builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@ jobs:
strategy:
matrix:
include:
- python_version: p39
arch: x86
build_platform: linux/amd64
- python_version: p310
arch: x86
build_platform: linux/amd64
Expand Down
47 changes: 47 additions & 0 deletions pipeline/Serverless/02_pipeline/pipeline_build_containers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,29 @@ build311:
- dynamodb:GetItem
Resource: ${self:custom.dbArn}

build312:
description: Builds the package in a container for python3.12 then uploads to S3
image: ${ssm:/${self:service}/${self:provider.stage}/build/p312/x86/repo}@${ssm:/${self:service}/${self:provider.stage}/build/p312/x86/digest}
timeout: 600
memorySize: 1769 # exactly one vcpu
iamRoleStatementsName: ${self:provider.stage}-buildp312
iamRoleStatements:
- Effect: Allow
Action:
- s3:PutObject
- s3:PutObjectAcl
Resource: ${self:custom.s3LayersArn}/*
- Effect: Allow
Action:
- s3:ListBucket
Resource: ${self:custom.s3LayersArn}
- Effect: Allow
Action:
- dynamodb:PutItem
- dynamodb:UpdateItem
- dynamodb:GetItem
Resource: ${self:custom.dbArn}


build310Arm64:
description: Builds the package in a container for python3.10 then uploads to S3
Expand Down Expand Up @@ -99,6 +122,30 @@ build311Arm64:
memorySize: 1769 # exactly one vcpu
iamRoleStatementsName: ${self:provider.stage}-buildp311arm64
iamRoleStatements:
- Effect: Allow
Action:
- s3:PutObject
- s3:PutObjectAcl
Resource: ${self:custom.s3LayersArn}/*
- Effect: Allow
Action:
- s3:ListBucket
Resource: ${self:custom.s3LayersArn}
- Effect: Allow
Action:
- dynamodb:PutItem
- dynamodb:UpdateItem
- dynamodb:GetItem
Resource: ${self:custom.dbArn}
architecture: arm64

build312Arm64:
description: Builds the package in a container for python3.12 then uploads to S3
image: ${ssm:/${self:service}/${self:provider.stage}/build/p312/arm64/repo}@${ssm:/${self:service}/${self:provider.stage}/build/p312/arm64/digest}
timeout: 600
memorySize: 1769 # exactly one vcpu
iamRoleStatementsName: ${self:provider.stage}-buildp312arm64
iamRoleStatements:
- Effect: Allow
Action:
- s3:PutObject
Expand Down
38 changes: 19 additions & 19 deletions pipeline/Serverless/state_machines/02_pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,32 +29,33 @@ definition:
ChoicePythonVersion:
Type: Choice
Choices:
- Variable: $.python_version
StringEquals: "p3.8"
Next: Build38
- Variable: $.python_version
StringEquals: "p3.9"
Next: Build39
- Variable: $.python_version
StringEquals: "p3.10"
Next: Build310
- Variable: $.python_version
StringEquals: "p3.11"
Next: Build311
- Variable: $.python_version
StringEquals: "p3.12"
Next: Build312
- Variable: $.python_version
StringEquals: "p3.10-arm64"
Next: Build310arm64
- Variable: $.python_version
StringEquals: "p3.11-arm64"
Next: Build311arm64
- Variable: $.python_version
StringEquals: "p3.12-arm64"
Next: Build312arm64
Default: UnknownPythonVersion
Build38:
Build310:
Type: Task
Resource:
Fn::GetAtt: [BuildLambdaFunction, Arn]
Fn::GetAtt: [Build310LambdaFunction, Arn]
Next: Deploy
Retry:
- ErrorEquals:
- Lambda.AWSLambdaException
- States.Timeout
- Lambda.ClientExecutionTimeoutException
- Lambda.ServiceException
Expand All @@ -67,10 +68,10 @@ definition:
- ErrorEquals:
- States.ALL
Next: BuildFail
Build39:
Build311:
Type: Task
Resource:
Fn::GetAtt: [Build39LambdaFunction, Arn]
Fn::GetAtt: [Build311LambdaFunction, Arn]
Next: Deploy
Retry:
- ErrorEquals:
Expand All @@ -87,10 +88,10 @@ definition:
- ErrorEquals:
- States.ALL
Next: BuildFail
Build310:
Build312:
Type: Task
Resource:
Fn::GetAtt: [Build310LambdaFunction, Arn]
Fn::GetAtt: [Build312LambdaFunction, Arn]
Next: Deploy
Retry:
- ErrorEquals:
Expand All @@ -107,14 +108,13 @@ definition:
- ErrorEquals:
- States.ALL
Next: BuildFail
Build311:
Build310arm64:
Type: Task
Resource:
Fn::GetAtt: [Build311LambdaFunction, Arn]
Fn::GetAtt: [Build310Arm64LambdaFunction, Arn]
Next: Deploy
Retry:
- ErrorEquals:
- Lambda.AWSLambdaException
- States.Timeout
- Lambda.ClientExecutionTimeoutException
- Lambda.ServiceException
Expand All @@ -127,10 +127,10 @@ definition:
- ErrorEquals:
- States.ALL
Next: BuildFail
Build310arm64:
Build311arm64:
Type: Task
Resource:
Fn::GetAtt: [Build310Arm64LambdaFunction, Arn]
Fn::GetAtt: [Build311Arm64LambdaFunction, Arn]
Next: Deploy
Retry:
- ErrorEquals:
Expand All @@ -146,10 +146,10 @@ definition:
- ErrorEquals:
- States.ALL
Next: BuildFail
Build311arm64:
Build312arm64:
Type: Task
Resource:
Fn::GetAtt: [Build311Arm64LambdaFunction, Arn]
Fn::GetAtt: [Build312Arm64LambdaFunction, Arn]
Next: Deploy
Retry:
- ErrorEquals:
Expand Down
11 changes: 7 additions & 4 deletions pipeline/config/config.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,21 @@
{
"python_versions": ["p3.9", "p3.10", "p3.10-arm64", "p3.11", "p3.11-arm64"],
"p3.9": {
"packages_file": "packages_p39.csv"
},
"python_versions": ["p3.10", "p3.10-arm64", "p3.11", "p3.11-arm64", "p3.12", "p3.12-arm64"],
"p3.10": {
"packages_file": "packages_p310.csv"
},
"p3.11":{
"packages_file": "packages_p311.csv"
},
"p3.12":{
"packages_file": "packages_p312.csv"
},
"p3.10-arm64": {
"packages_file": "packages_p310-arm64.csv"
},
"p3.11-arm64":{
"packages_file": "packages_p311-arm64.csv"
},
"p3.12-arm64":{
"packages_file": "packages_p312-arm64.csv"
}
}
18 changes: 18 additions & 0 deletions pipeline/config/packages_p312-arm64.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
Package_Name,License,Authors/Maintainers
aws-xray-sdk,Apache-2.0,AWS
aws-requests-auth,BSD,[email protected]
bcrypt,Apache-2.0,[email protected]
beautifulsoup4,MIT,Leonard Richardson <[email protected]>
boto3,Apache-2.0,AWS
cryptography,Apache-2.0,The Python Cryptographic Authority and individual contributors <[email protected]>
dynamodb-encryption-sdk,Apache-2.0,<[email protected]>
idna,https://github.com/kjd/idna/blob/master/LICENSE.rst,Kim Davis [email protected]
jinja2,BSD,Armin Ronache <[email protected]>; Pallets <[email protected]>
numpy,https://www.numpy.org/license.html,[email protected]
pandas,BSD,<[email protected]>
pyqldb,Apache-2.0,AWS
redshift-connector,Apache License Version 2.0,Amazon Web Services <[email protected]>
requests,Apache-2.0,Kenneth Reitz <[email protected]>
mysql-connector-python,GNU GPLv2,Oracle
aliyun-python-sdk-actiontrail,Apache-2.0,Aliyun <[email protected]>
tabulate,MIT,[email protected]
18 changes: 18 additions & 0 deletions pipeline/config/packages_p312.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
Package_Name,License,Authors/Maintainers
aws-xray-sdk,Apache-2.0,AWS
aws-requests-auth,BSD,[email protected]
bcrypt,Apache-2.0,[email protected]
beautifulsoup4,MIT,Leonard Richardson <[email protected]>
boto3,Apache-2.0,AWS
cryptography,Apache-2.0,The Python Cryptographic Authority and individual contributors <[email protected]>
dynamodb-encryption-sdk,Apache-2.0,<[email protected]>
idna,https://github.com/kjd/idna/blob/master/LICENSE.rst,Kim Davis [email protected]
jinja2,BSD,Armin Ronache <[email protected]>; Pallets <[email protected]>
numpy,https://www.numpy.org/license.html,[email protected]
pandas,BSD,<[email protected]>
pyqldb,Apache-2.0,AWS
redshift-connector,Apache License Version 2.0,Amazon Web Services <[email protected]>
requests,Apache-2.0,Kenneth Reitz <[email protected]>
mysql-connector-python,GNU GPLv2,Oracle
aliyun-python-sdk-actiontrail,Apache-2.0,Aliyun <[email protected]>
tabulate,MIT,[email protected]
104 changes: 0 additions & 104 deletions pipeline/config/packages_p38.csv

This file was deleted.

Loading

0 comments on commit eb77c3b

Please sign in to comment.