From 0df8476165395ec8793b2ac0bbc0457d8021cbb9 Mon Sep 17 00:00:00 2001 From: snehapar9 Date: Sun, 5 Nov 2023 23:42:18 -0800 Subject: [PATCH] Test validation pipeline --- azurecontainerapps.ts | 2 +- dist/index.js | 6 +++--- src/ContainerAppHelper.ts | 3 +-- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/azurecontainerapps.ts b/azurecontainerapps.ts index 36c96bf3..45717754 100644 --- a/azurecontainerapps.ts +++ b/azurecontainerapps.ts @@ -532,7 +532,7 @@ export class azurecontainerapps { await this.appHelper.createContainerAppFromYaml(this.containerAppName, this.resourceGroup, this.yamlConfigPath); } else if (this.useCliToBuildAndPushImage && !this.util.isNullOrEmpty(this.appSourcePath)) { // Create the Container App from the command line arguments - await this.appHelper.createContainerAppWithUp(this.containerAppName, this.resourceGroup, this.containerAppEnvironment, this.appSourcePath, this.location, this.commandLineArgs); + await this.appHelper.createContainerAppWithUp(this.containerAppName, this.resourceGroup, this.containerAppEnvironment, this.appSourcePath, this.commandLineArgs); } else { // Create the Container App from command line arguments await this.appHelper.createContainerApp(this.containerAppName, this.resourceGroup, this.containerAppEnvironment, this.imageToDeploy, this.commandLineArgs); diff --git a/dist/index.js b/dist/index.js index bcc81e35..40d3df03 100644 --- a/dist/index.js +++ b/dist/index.js @@ -631,7 +631,7 @@ var azurecontainerapps = /** @class */ (function () { case 2: if (!(this.useCliToBuildAndPushImage && !this.util.isNullOrEmpty(this.appSourcePath))) return [3 /*break*/, 4]; // Create the Container App from the command line arguments - return [4 /*yield*/, this.appHelper.createContainerAppWithUp(this.containerAppName, this.resourceGroup, this.containerAppEnvironment, this.appSourcePath, this.location, this.commandLineArgs)]; + return [4 /*yield*/, this.appHelper.createContainerAppWithUp(this.containerAppName, this.resourceGroup, this.containerAppEnvironment, this.appSourcePath, this.commandLineArgs)]; case 3: // Create the Container App from the command line arguments _a.sent(); @@ -4749,7 +4749,7 @@ var ContainerAppHelper = /** @class */ (function () { * @param appSourcePath - the path to the application source * @param optionalCmdArgs - a set of optional command line arguments */ - ContainerAppHelper.prototype.createContainerAppWithUp = function (containerAppName, resourceGroup, environment, appSourcePath, location, optionalCmdArgs) { + ContainerAppHelper.prototype.createContainerAppWithUp = function (containerAppName, resourceGroup, environment, appSourcePath, optionalCmdArgs) { return __awaiter(this, void 0, void 0, function () { var command_2, err_2; return __generator(this, function (_a) { @@ -4759,7 +4759,7 @@ var ContainerAppHelper = /** @class */ (function () { _a.label = 1; case 1: _a.trys.push([1, 3, , 4]); - command_2 = "az containerapp up -n " + containerAppName + " -g " + resourceGroup + " --source " + appSourcePath + " --environment " + environment + " --location " + location; + command_2 = "az containerapp up -n " + containerAppName + " -g " + resourceGroup + " --source " + appSourcePath + " --environment " + environment; optionalCmdArgs.forEach(function (val) { command_2 += " " + val; }); diff --git a/src/ContainerAppHelper.ts b/src/ContainerAppHelper.ts index edf24b72..f4f2b5ae 100644 --- a/src/ContainerAppHelper.ts +++ b/src/ContainerAppHelper.ts @@ -58,11 +58,10 @@ export class ContainerAppHelper { resourceGroup: string, environment: string, appSourcePath: string, - location: string, optionalCmdArgs: string[]) { toolHelper.writeDebug(`Attempting to create Container App with name "${containerAppName}" in resource group "${resourceGroup}" based on the application source path "${appSourcePath}"`); try { - let command = `az containerapp up -n ${containerAppName} -g ${resourceGroup} --source ${appSourcePath} --environment ${environment} --location ${location}`; + let command = `az containerapp up -n ${containerAppName} -g ${resourceGroup} --source ${appSourcePath} --environment ${environment}`; optionalCmdArgs.forEach(function (val: string) { command += ` ${val}`; });