Skip to content

Commit eaf87ff

Browse files
committed
back to this
1 parent cb75df5 commit eaf87ff

File tree

2 files changed

+22
-19
lines changed

2 files changed

+22
-19
lines changed

.github/workflows/build.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -919,7 +919,9 @@ jobs:
919919
- name: Pull SAM Docker images
920920
if: matrix.test-application == 'aws-serverless'
921921
run: |
922-
docker pull public.ecr.aws/sam/emulation-nodejs18.x
922+
docker pull public.ecr.aws/sam/build-nodejs18.x:latest
923+
docker pull public.ecr.aws/sam/build-nodejs20.x:latest
924+
docker pull public.ecr.aws/sam/build-nodejs22.x:latest
923925
- name: Restore caches
924926
uses: ./.github/actions/restore-cache
925927
with:

dev-packages/e2e-tests/test-applications/aws-serverless/tests/lambda-fixtures.ts

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -29,24 +29,25 @@ export const test = base.extend<{ testEnvironment: LocalLambdaStack; lambdaClien
2929
const debugLog = tmp.fileSync({ prefix: 'sentry_aws_lambda_tests_sam_debug', postfix: '.log' });
3030
console.log(`[test_environment fixture] Writing SAM debug log to: ${debugLog.name}`);
3131

32-
const samProcess = spawn(
33-
'sam',
34-
[
35-
'local',
36-
'start-lambda',
37-
'--debug',
38-
'--template',
39-
SAM_TEMPLATE_FILE,
40-
'--warm-containers',
41-
'EAGER',
42-
'--docker-network',
43-
DOCKER_NETWORK_NAME,
44-
...(process.env.NODE_VERSION === '18' ? ['--invoke-image', `public.ecr.aws/sam/emulation-nodejs18.x`] : []),
45-
],
46-
{
47-
stdio: ['ignore', debugLog.fd, debugLog.fd],
48-
},
49-
);
32+
const args = [
33+
'local',
34+
'start-lambda',
35+
'--debug',
36+
'--template',
37+
SAM_TEMPLATE_FILE,
38+
'--warm-containers',
39+
'EAGER',
40+
'--docker-network',
41+
DOCKER_NETWORK_NAME,
42+
];
43+
44+
if (process.env.NODE_VERSION) {
45+
args.push('--invoke-image', `public.ecr.aws/sam/build-nodejs${process.env.NODE_VERSION}.x:latest`);
46+
}
47+
48+
const samProcess = spawn('sam', args, {
49+
stdio: ['ignore', debugLog.fd, debugLog.fd],
50+
});
5051

5152
try {
5253
await LocalLambdaStack.waitForStack();

0 commit comments

Comments
 (0)