-
Notifications
You must be signed in to change notification settings - Fork 199
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Added support for container apps with publish profile * Renamed publish profile container provider * refactor * Addressed review comments * Integrated diagnostics runtime API to get appOS * updated error message * updated error messages * updated error message * updated unit tests for publish profile container * quotes fix * changes in PublishProfileContainerWebAppValidator * refactor * added package-lock.json * adding lib
- Loading branch information
Showing
20 changed files
with
271 additions
and
49 deletions.
There are no files selected for viewing
27 changes: 27 additions & 0 deletions
27
lib/ActionInputValidator/ActionValidators/PublishProfileContainerWebAppValidator.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
"use strict"; | ||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } | ||
return new (P || (P = Promise))(function (resolve, reject) { | ||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } | ||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } | ||
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } | ||
step((generator = generator.apply(thisArg, _arguments || [])).next()); | ||
}); | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const Validations_1 = require("../Validations"); | ||
const actionparameters_1 = require("../../actionparameters"); | ||
class PublishProfileContainerWebAppValidator { | ||
validate() { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
const actionParams = actionparameters_1.ActionParameters.getActionParams(); | ||
Validations_1.packageNotAllowed(actionParams.packageInput); | ||
yield Validations_1.windowsContainerAppNotAllowedForPublishProfile(); | ||
Validations_1.multiContainerNotAllowed(actionParams.multiContainerConfigFile); | ||
Validations_1.startupCommandNotAllowed(actionParams.startupCommand); | ||
Validations_1.validateAppDetails(); | ||
Validations_1.validateSingleContainerInputs(); | ||
}); | ||
} | ||
} | ||
exports.PublishProfileContainerWebAppValidator = PublishProfileContainerWebAppValidator; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
lib/DeploymentProvider/Providers/PublishProfileWebAppContainerDeploymentProvider.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
"use strict"; | ||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } | ||
return new (P || (P = Promise))(function (resolve, reject) { | ||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } | ||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } | ||
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } | ||
step((generator = generator.apply(thisArg, _arguments || [])).next()); | ||
}); | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const BaseWebAppDeploymentProvider_1 = require("./BaseWebAppDeploymentProvider"); | ||
class PublishProfileWebAppContainerDeploymentProvider extends BaseWebAppDeploymentProvider_1.BaseWebAppDeploymentProvider { | ||
DeployWebAppStep() { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
const appName = this.actionParams.appName; | ||
const images = this.actionParams.images; | ||
const isLinux = this.actionParams.isLinux; | ||
yield this.kuduServiceUtility.deployWebAppImage(appName, images, isLinux); | ||
}); | ||
} | ||
} | ||
exports.PublishProfileWebAppContainerDeploymentProvider = PublishProfileWebAppContainerDeploymentProvider; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
class RuntimeConstants { | ||
} | ||
exports.default = RuntimeConstants; | ||
RuntimeConstants.system = "system"; | ||
RuntimeConstants.osName = "os_name"; | ||
RuntimeConstants.Windows = "Windows"; | ||
RuntimeConstants.Unix = "Unix"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
src/ActionInputValidator/ActionValidators/PublishProfileContainerWebAppValidator.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { packageNotAllowed, windowsContainerAppNotAllowedForPublishProfile, multiContainerNotAllowed, startupCommandNotAllowed, validateSingleContainerInputs, validateAppDetails } from "../Validations"; | ||
import { ActionParameters } from "../../actionparameters"; | ||
import { IValidator } from "./IValidator"; | ||
|
||
export class PublishProfileContainerWebAppValidator implements IValidator { | ||
async validate(): Promise<void> { | ||
const actionParams: ActionParameters = ActionParameters.getActionParams(); | ||
|
||
packageNotAllowed(actionParams.packageInput); | ||
|
||
await windowsContainerAppNotAllowedForPublishProfile(); | ||
|
||
multiContainerNotAllowed(actionParams.multiContainerConfigFile); | ||
|
||
startupCommandNotAllowed(actionParams.startupCommand); | ||
|
||
validateAppDetails(); | ||
|
||
validateSingleContainerInputs(); | ||
} | ||
|
||
} |
Oops, something went wrong.