Skip to content

Commit c33efac

Browse files
authored
CCM-9857: fix layer deployment (#442)
1 parent d2570bb commit c33efac

File tree

4 files changed

+5
-4
lines changed

4 files changed

+5
-4
lines changed

infrastructure/terraform/components/app/pre.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ npm ci
22

33
npm run generate-dependencies --workspaces --if-present
44

5-
./lambdas/layers/pdfjs/build.sh
5+
$(git rev-parse --show-toplevel)/lambdas/layers/pdfjs/build.sh

infrastructure/terraform/modules/backend-api/lambda_layer_pdfjs.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ resource "aws_lambda_layer_version" "lambda_layer_pdfjs" {
22
layer_name = "${local.csi}-nodejs20-pdfjs-dist"
33
description = "pdfjs-dist dependencies for Node.js v20"
44
filename = local.pdfjs_layer_zip
5-
source_code_hash = filebase64sha256(local.pdfjs_layer_zip)
5+
source_code_hash = filebase64sha256(local.pdfjs_layer_lockfile)
66
compatible_runtimes = ["nodejs20.x"]
77
}

infrastructure/terraform/modules/backend-api/locals.tf

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
locals {
22
csi = "${var.csi}-${var.module}"
33

4-
repo_root = abspath("${path.module}/../../../..")
4+
repo_root = abspath("${path.module}/../../../..")
55
lambdas_source_code_dir = abspath("${local.repo_root}/lambdas")
66
pdfjs_layer_zip = abspath("${local.lambdas_source_code_dir}/layers/pdfjs/dist/layer/pdfjs-layer.zip")
7+
pdfjs_layer_lockfile = abspath("${local.lambdas_source_code_dir}/layers/pdfjs/package-lock.json")
78

89
openapi_spec = templatefile("${path.module}/spec.tmpl.json", {
910
AWS_REGION = var.region

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)