Skip to content

Commit

Permalink
Test validation pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
snehapar9 committed Nov 6, 2023
1 parent f8cf64f commit ea2178d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
4 changes: 2 additions & 2 deletions azurecontainerapps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.createOrUpdateContainerAppWithUp(this.containerAppName, this.resourceGroup, this.containerAppEnvironment, this.appSourcePath, this.commandLineArgs);
await this.appHelper.createOrUpdateContainerAppWithUp(this.containerAppName, this.resourceGroup, this.containerAppEnvironment, this.appSourcePath, this.location, 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);
Expand All @@ -558,7 +558,7 @@ export class azurecontainerapps {
await this.appHelper.updateContainerApp(this.containerAppName, this.resourceGroup, this.imageToDeploy, this.commandLineArgs);
} else if (this.useCliToBuildAndPushImage && !this.util.isNullOrEmpty(this.appSourcePath)) {
// Create the Container App from the command line arguments
await this.appHelper.createOrUpdateContainerAppWithUp(this.containerAppName, this.resourceGroup, this.containerAppEnvironment, this.appSourcePath, this.commandLineArgs);
await this.appHelper.createOrUpdateContainerAppWithUp(this.containerAppName, this.resourceGroup, this.containerAppEnvironment, this.appSourcePath, this.location, this.commandLineArgs);
} else {
// Update the Container App using the 'up' command
await this.appHelper.updateContainerAppWithUp(this.containerAppName, this.resourceGroup, this.imageToDeploy, this.commandLineArgs, this.ingress, this.targetPort);
Expand Down
8 changes: 4 additions & 4 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.createOrUpdateContainerAppWithUp(this.containerAppName, this.resourceGroup, this.containerAppEnvironment, this.appSourcePath, this.commandLineArgs)];
return [4 /*yield*/, this.appHelper.createOrUpdateContainerAppWithUp(this.containerAppName, this.resourceGroup, this.containerAppEnvironment, this.appSourcePath, this.location, this.commandLineArgs)];
case 3:
// Create the Container App from the command line arguments
_a.sent();
Expand Down Expand Up @@ -669,7 +669,7 @@ var azurecontainerapps = /** @class */ (function () {
case 13:
if (!(this.useCliToBuildAndPushImage && !this.util.isNullOrEmpty(this.appSourcePath))) return [3 /*break*/, 15];
// Create the Container App from the command line arguments
return [4 /*yield*/, this.appHelper.createOrUpdateContainerAppWithUp(this.containerAppName, this.resourceGroup, this.containerAppEnvironment, this.appSourcePath, this.commandLineArgs)];
return [4 /*yield*/, this.appHelper.createOrUpdateContainerAppWithUp(this.containerAppName, this.resourceGroup, this.containerAppEnvironment, this.appSourcePath, this.location, this.commandLineArgs)];
case 14:
// Create the Container App from the command line arguments
_a.sent();
Expand Down Expand Up @@ -4754,7 +4754,7 @@ var ContainerAppHelper = /** @class */ (function () {
* @param appSourcePath - the path to the application source
* @param optionalCmdArgs - a set of optional command line arguments
*/
ContainerAppHelper.prototype.createOrUpdateContainerAppWithUp = function (containerAppName, resourceGroup, environment, appSourcePath, optionalCmdArgs) {
ContainerAppHelper.prototype.createOrUpdateContainerAppWithUp = function (containerAppName, resourceGroup, environment, appSourcePath, location, optionalCmdArgs) {
return __awaiter(this, void 0, void 0, function () {
var command_2, err_2;
return __generator(this, function (_a) {
Expand All @@ -4764,7 +4764,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;
command_2 = "az containerapp up -n " + containerAppName + " -g " + resourceGroup + " --source " + appSourcePath + " --environment " + environment + " --location " + location;
optionalCmdArgs.forEach(function (val) {
command_2 += " " + val;
});
Expand Down
3 changes: 2 additions & 1 deletion src/ContainerAppHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,11 @@ 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}`;
let command = `az containerapp up -n ${containerAppName} -g ${resourceGroup} --source ${appSourcePath} --environment ${environment} --location ${location}`;
optionalCmdArgs.forEach(function (val: string) {
command += ` ${val}`;
});
Expand Down

0 comments on commit ea2178d

Please sign in to comment.