test new pdf layer build

This commit is contained in:
Grzegorz Huber
2024-07-15 14:28:19 +02:00
parent 7d881d564c
commit b87ed9dc15
3 changed files with 39 additions and 0 deletions
+10
View File
@@ -385,3 +385,13 @@ pipelines:
- *aws-context-uat
- pip install -r requirements.txt
- IS_DEPLOY_ALL=true python terraform.py apply --environment=uat --module=textract-pipeline/terraform --apply-extra-args="-target=null_resource.snowsql_client_create"
feature/UAT-pdf-layer-test:
- step:
name: Apply textract-pipeline on UAT (pdf layer)
image: hugree/bitbucket-aws-python38-tf154:latest
oidc: true
script:
- *aws-context-uat
- pip install -r requirements.txt
- BB_PIPELINE_BRANCH="UAT" python terraform.py apply --environment=uat --module=textract-pipeline/terraform --apply-extra-args="-target=module.pdf_layer"
@@ -0,0 +1,2 @@
PyPDF2
pycryptodome
+27
View File
@@ -192,4 +192,31 @@ resource "aws_iam_role_policy_attachment" "cloudwatch-policy-attach" {
resource "aws_iam_role_policy_attachment" "VPC-policy-attach" {
role = "${aws_iam_role.lambda_role.name}"
policy_arn = "${data.aws_iam_policy.AWSLambdaVPCAccessExecutionRole.arn}"
}
module "pdf_layer" {
source = "terraform-aws-modules/lambda/aws"
create_layer = true
layer_name = "pdfcryptolayer2-terraform"
description = "Fixed PDF layer"
compatible_runtimes = ["python3.12"]
build_in_docker = true
source_path = {
path = "../src/lambda-layer/pypdf2-layer-new",
prefix_in_zip = "python"
# npm_requirements = "package.json"
commands = [
"pip install -r requirements.txt -t .",
":zip . python"
],
patterns = [
"!.*/.*\\.txt", # Skip all txt files recursively
],
}
store_on_s3 = false
}