Skip to content

Commit

Permalink
Fix build failures and trigger pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
snehapar9 committed Sep 24, 2023
1 parent fd23345 commit 78ce264
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
16 changes: 8 additions & 8 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4857,7 +4857,7 @@ var ContainerAppHelper = /** @class */ (function () {
*/
ContainerAppHelper.prototype.doesContainerAppEnvironmentExist = function (containerAppEnvironment, resourceGroup) {
return __awaiter(this, void 0, void 0, function () {
var command, executionResult, err_7;
var command, exitCode, err_7;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
Expand All @@ -4866,10 +4866,10 @@ var ContainerAppHelper = /** @class */ (function () {
case 1:
_a.trys.push([1, 3, , 4]);
command = "containerapp env show -n " + containerAppEnvironment + " -g " + resourceGroup + " -o none";
return [4 /*yield*/, new Utility_1.Utility().executeAndthrowIfError("az", command.split(' '))];
return [4 /*yield*/, exec.exec("az", command.split(' '))];
case 2:
executionResult = _a.sent();
return [2 /*return*/, !executionResult.stderr];
exitCode = _a.sent();
return [2 /*return*/, exitCode === 0];
case 3:
err_7 = _a.sent();
core.warning(err_7.message);
Expand Down Expand Up @@ -5013,7 +5013,7 @@ var ContainerAppHelper = /** @class */ (function () {
_a.trys.push([1, 3, , 4]);
command = "containerapp env create -n " + name + " -g " + resourceGroup;
if (!util.isNullOrEmpty(location)) {
command += " -l " + location;
command += '-l' + ("" + location);
}
return [4 /*yield*/, new Utility_1.Utility().executeAndthrowIfError("az", command.split(' '))];
case 2:
Expand Down Expand Up @@ -5105,11 +5105,11 @@ var ContainerAppHelper = /** @class */ (function () {
_a.label = 1;
case 1:
_a.trys.push([1, 3, , 4]);
telemetryArg = "--env CALLER_ID=github-actions-v1";
telemetryArg = "CALLER_ID=github-actions-v1";
if (this.disableTelemetry) {
telemetryArg = "--env ORYX_DISABLE_TELEMETRY=true";
telemetryArg = "ORYX_DISABLE_TELEMETRY=true";
}
return [4 /*yield*/, new Utility_1.Utility().executeAndthrowIfError("" + PACK_CMD, ['build', "" + imageToDeploy, '--path', "" + appSourcePath, '--builder', "" + ORYX_BUILDER_IMAGE, '--run-image', "mcr.microsoft.com/oryx/" + runtimeStack, '--env', "ORYX_DISABLE_TELEMETRY=true"])];
return [4 /*yield*/, new Utility_1.Utility().executeAndthrowIfError("" + PACK_CMD, ['build', "" + imageToDeploy, '--path', "" + appSourcePath, '--builder', "" + ORYX_BUILDER_IMAGE, '--run-image', "mcr.microsoft.com/oryx/" + runtimeStack, '--env', "" + telemetryArg])];
case 2:
_a.sent();
return [3 /*break*/, 4];
Expand Down
12 changes: 6 additions & 6 deletions src/ContainerAppHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,8 @@ export class ContainerAppHelper {
core.debug(`Attempting to determine if Container App Environment with name "${containerAppEnvironment}" exists in resource group "${resourceGroup}"`);
try {
const command = `containerapp env show -n ${containerAppEnvironment} -g ${resourceGroup} -o none`;
const executionResult = await new Utility().executeAndthrowIfError(`az`, command.split(' '));
return !executionResult.stderr;
const exitCode = await exec.exec(`az`, command.split(' '));
return exitCode === 0;
} catch (err) {
core.warning(err.message);
return false;
Expand Down Expand Up @@ -267,7 +267,7 @@ export class ContainerAppHelper {
try {
let command = `containerapp env create -n ${name} -g ${resourceGroup}`;
if (!util.isNullOrEmpty(location)) {
command += ` -l ${location}`;
command += '-l' + `${location}`;
}
await new Utility().executeAndthrowIfError(`az`, command.split(' '));
} catch (err) {
Expand Down Expand Up @@ -323,11 +323,11 @@ export class ContainerAppHelper {
runtimeStack: string) {
core.debug(`Attempting to create a runnable application image using the Oryx++ Builder with image name "${imageToDeploy}"`);
try {
let telemetryArg = `--env CALLER_ID=github-actions-v1`;
let telemetryArg = `CALLER_ID=github-actions-v1`;
if (this.disableTelemetry) {
telemetryArg = `--env ORYX_DISABLE_TELEMETRY=true`;
telemetryArg = `ORYX_DISABLE_TELEMETRY=true`;
}
await new Utility().executeAndthrowIfError(`${PACK_CMD}`, ['build', `${imageToDeploy}`, '--path', `${appSourcePath}`, '--builder', `${ORYX_BUILDER_IMAGE}`, '--run-image', `mcr.microsoft.com/oryx/${runtimeStack}`, '--env', `ORYX_DISABLE_TELEMETRY=true`]);
await new Utility().executeAndthrowIfError(`${PACK_CMD}`, ['build', `${imageToDeploy}`, '--path', `${appSourcePath}`, '--builder', `${ORYX_BUILDER_IMAGE}`, '--run-image', `mcr.microsoft.com/oryx/${runtimeStack}`, '--env', `${telemetryArg}`]);
} catch (err) {
core.error(err.message);
throw err;
Expand Down

0 comments on commit 78ce264

Please sign in to comment.