From 6e3c5d16ad795995988f5d991a98047349510aa1 Mon Sep 17 00:00:00 2001 From: hveldstra Date: Mon, 19 Aug 2024 15:21:10 +0100 Subject: [PATCH] fix: bundle dotenv files on Azure Remove explicit check for AWS Lambda from BOM so that dotenv files get bundled by default on all platforms other than AWS ECS. --- packages/artillery/lib/cmds/run.js | 2 +- packages/artillery/lib/platform/aws-ecs/legacy/bom.js | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/artillery/lib/cmds/run.js b/packages/artillery/lib/cmds/run.js index e29e67591b..33f3a9bcde 100644 --- a/packages/artillery/lib/cmds/run.js +++ b/packages/artillery/lib/cmds/run.js @@ -44,7 +44,7 @@ class RunCommand extends Command { async run() { const { flags, argv, args } = await this.parse(RunCommand); - if (flags.platform === 'aws:fargate') { + if (flags.platform === 'aws:ecs') { // Delegate to existing implementation const RunFargateCommand = require('./run-fargate'); return await RunFargateCommand.run(argv); diff --git a/packages/artillery/lib/platform/aws-ecs/legacy/bom.js b/packages/artillery/lib/platform/aws-ecs/legacy/bom.js index 1d34b3ebef..c6e3928b88 100644 --- a/packages/artillery/lib/platform/aws-ecs/legacy/bom.js +++ b/packages/artillery/lib/platform/aws-ecs/legacy/bom.js @@ -379,8 +379,7 @@ function getExtraFiles(context, next) { function getDotEnv(context, next) { const flags = context.opts.flags; - //TODO: For now only enabled on Lambda. Enable this for Fargate after refactoring to allow for it - if (!flags.dotenv || flags.platform !== 'aws:lambda') { + if (!flags.dotenv || flags.platform === 'aws:ecs') { return next(null, context); }