-
Notifications
You must be signed in to change notification settings - Fork 225
Publish prof container master #35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
66b2a02
Added support for container apps with publish profile
aksm-ms 9a4f8f8
Renamed publish profile container provider
aksm-ms ecdb32e
refactor
aksm-ms 5927693
Addressed review comments
aksm-ms ef0869d
Integrated diagnostics runtime API to get appOS
aksm-ms 0b3e14c
updated error message
aksm-ms cd99788
updated error messages
aksm-ms ff0253e
updated error message
aksm-ms a1b96c6
updated unit tests for publish profile container
aksm-ms aca1ceb
quotes fix
aksm-ms a880245
changes in PublishProfileContainerWebAppValidator
aksm-ms d5c2be2
refactor
aksm-ms b108aaf
added package-lock.json
aksm-ms 1909fe2
adding lib
aksm-ms File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
27 changes: 27 additions & 0 deletions
27
lib/ActionInputValidator/ActionValidators/PublishProfileContainerWebAppValidator.js
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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); | ||
|
|
||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. extra line |
||
| startupCommandNotAllowed(actionParams.startupCommand); | ||
|
|
||
| validateAppDetails(); | ||
|
|
||
| validateSingleContainerInputs(); | ||
| } | ||
|
|
||
| } | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
public async
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
public by default - https://www.typescriptlang.org/docs/handbook/classes.html#public-by-default
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is just that we have been using public async in all actions. Wanted to keep it in sync. :)