Skip to content

Commit 393f751

Browse files
BALAGA-GAYATRIdependabot[bot]raahmedJason Freebergaksm-ms
authored
updating users/amkawade/kubeapp with master (#169) (#170)
* updating users/amkawade/kubeapp with master (#169) * Bump lodash from 4.17.15 to 4.17.20 (#72) Bumps [lodash](https://github.com/lodash/lodash) from 4.17.15 to 4.17.20. - [Release notes](https://github.com/lodash/lodash/releases) - [Commits](lodash/lodash@4.17.15...4.17.20) Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Update README.md (#69) Placed a link to ensure that customers loop back to the pre-requisite section before building a Web App if they have skipped over it. * Update README.md (#80) * Update README.md * Update README.md (#82) * Fixed a small syntax error in the markdown 😊 (#84) * Update README.md (#87) * Make app-name and slot-name as lower case * Temp add node_modules * audit fix * update node version * temp commit for test * revert temp commit * remove node_modules * remove unnecessary file * Addressing comment * Update issue templates * Updated Readme for webapps-deploy actions (#97) * Update README.md * Update README.md * Update README.md Co-authored-by: Usha N <[email protected]> * added logs for multicontainer support (#104) * fix for duplicate duployment issue (#111) * Fix typo in error message (#116) * Fix typo in error message Change "credentails" to "credentials". * Fix typo in lib Also fix the typo in the built code in the lib folder. * Bump y18n from 4.0.0 to 4.0.1 Bumps [y18n](https://github.com/yargs/y18n) from 4.0.0 to 4.0.1. - [Release notes](https://github.com/yargs/y18n/releases) - [Changelog](https://github.com/yargs/y18n/blob/master/CHANGELOG.md) - [Commits](https://github.com/yargs/y18n/commits) Signed-off-by: dependabot[bot] <[email protected]> * Creating a workflow to label stale issues and PRs 1. Creating a workflow to label stale issues and PRs which have been open for 14 days with no activity. 2. Also close the stale issue in 5 days. PRs are not closed automatically as of now. * Update stale.yml * Update stale.yml * Updating trigger to run on a schedule only. * Update and rename stale.yml to defaultLabels.yml (#153) * Users/balaga gayatri/defaultlabels (#158) * Update and rename stale.yml to defaultLabels.yml * Update defaultLabels.yml * Update defaultLabels.yml * Update defaultLabels.yml Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Rabeea Emad <[email protected]> Co-authored-by: Jason Freeberg <[email protected]> Co-authored-by: aksm-ms <[email protected]> Co-authored-by: Teo Voinea <[email protected]> Co-authored-by: Usha N <[email protected]> Co-authored-by: xaxle <[email protected]> Co-authored-by: Shivangi Mittal <[email protected]> Co-authored-by: 20shivangi <[email protected]> Co-authored-by: Amruta Kawade <[email protected]> Co-authored-by: Zainudeen V K <[email protected]> Co-authored-by: Usha N <[email protected]> Co-authored-by: Martin Costello <[email protected]> Co-authored-by: Kanchan Verma <[email protected]> * updating lib files * kubeapp lib files * resolving conflicts Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Rabeea Emad <[email protected]> Co-authored-by: Jason Freeberg <[email protected]> Co-authored-by: aksm-ms <[email protected]> Co-authored-by: Teo Voinea <[email protected]> Co-authored-by: Usha N <[email protected]> Co-authored-by: xaxle <[email protected]> Co-authored-by: Shivangi Mittal <[email protected]> Co-authored-by: 20shivangi <[email protected]> Co-authored-by: Amruta Kawade <[email protected]> Co-authored-by: Zainudeen V K <[email protected]> Co-authored-by: Usha N <[email protected]> Co-authored-by: Martin Costello <[email protected]> Co-authored-by: Kanchan Verma <[email protected]>
1 parent d98547d commit 393f751

File tree

5 files changed

+7032
-87
lines changed

5 files changed

+7032
-87
lines changed

lib/ActionInputValidator/Validations.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,12 @@ exports.containerInputsNotAllowed = containerInputsNotAllowed;
4242
// Cross-validate provided app name and slot is same as that in publish profile
4343
function validateAppDetails() {
4444
let actionParams = actionparameters_1.ActionParameters.getActionParams();
45-
if (!!actionParams.appName || (!!actionParams.slotName && actionParams.slotName !== 'production')) {
45+
if (!!actionParams.appName || (!!actionParams.slotName && actionParams.slotName.toLowerCase() !== 'production')) {
4646
let creds = PublishProfile_1.PublishProfile.getPublishProfile(actionParams.publishProfileContent).creds;
4747
//for kubeapps in publishsettings file username doesn't start with $, for all other apps it starts with $
4848
let splitUsername = creds.username.startsWith("$") ? creds.username.toUpperCase().substring(1).split("__") : creds.username.toUpperCase().split("__");
4949
let appNameMatch = !actionParams.appName || actionParams.appName.toUpperCase() === splitUsername[0];
50-
let slotNameMatch = actionParams.slotName === 'production' || actionParams.slotName.toUpperCase() === splitUsername[1];
50+
let slotNameMatch = actionParams.slotName.toLowerCase() === 'production' || actionParams.slotName.toUpperCase() === splitUsername[1];
5151
if (!appNameMatch || !slotNameMatch) {
5252
throw new Error("Publish profile is invalid for app-name and slot-name provided. Provide correct publish profile credentials for app.");
5353
}
@@ -71,7 +71,7 @@ exports.packageNotAllowed = packageNotAllowed;
7171
// Error if multi container config file is provided
7272
function multiContainerNotAllowed(configFile) {
7373
if (!!configFile) {
74-
throw new Error("Multi container support is not available for windows containerized web app.");
74+
throw new Error("Multi container support is not available for windows containerized web app or with publish profile.");
7575
}
7676
}
7777
exports.multiContainerNotAllowed = multiContainerNotAllowed;

lib/ActionInputValidator/ValidatorFactory.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ class ValidatorFactory {
5959
}
6060
}
6161
else {
62-
throw new Error("Valid credentails are not available. Add Azure Login action before this action or provide publish-profile input.");
62+
throw new Error("Valid credentials are not available. Add Azure Login action before this action or provide publish-profile input.");
6363
}
6464
});
6565
}
@@ -82,4 +82,3 @@ class ValidatorFactory {
8282
}
8383
}
8484
exports.ValidatorFactory = ValidatorFactory;
85-

lib/DeploymentProvider/Providers/WebAppDeploymentProvider.js

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ const utility = __importStar(require("azure-actions-utility/utility.js"));
2121
const zipUtility = __importStar(require("azure-actions-utility/ziputility.js"));
2222
const packageUtility_1 = require("azure-actions-utility/packageUtility");
2323
const BaseWebAppDeploymentProvider_1 = require("./BaseWebAppDeploymentProvider");
24+
const AnnotationUtility_1 = require("azure-actions-appservice-rest/Utilities/AnnotationUtility");
2425
class WebAppDeploymentProvider extends BaseWebAppDeploymentProvider_1.BaseWebAppDeploymentProvider {
2526
DeployWebAppStep() {
2627
return __awaiter(this, void 0, void 0, function* () {
@@ -40,18 +41,18 @@ class WebAppDeploymentProvider extends BaseWebAppDeploymentProvider_1.BaseWebApp
4041
let folderPath = yield utility.generateTemporaryFolderForDeployment(false, webPackage, packageUtility_1.PackageType.jar);
4142
let output = yield utility.archiveFolderForDeployment(false, folderPath);
4243
webPackage = output.webDeployPkg;
43-
this.deploymentID = yield this.kuduServiceUtility.deployUsingZipDeploy(webPackage);
44+
this.deploymentID = yield this.kuduServiceUtility.deployUsingZipDeploy(webPackage, { slotName: this.actionParams.slotName });
4445
break;
4546
case packageUtility_1.PackageType.folder:
4647
let tempPackagePath = utility.generateTemporaryFolderOrZipPath(`${process.env.RUNNER_TEMP}`, false);
4748
webPackage = (yield zipUtility.archiveFolder(webPackage, "", tempPackagePath));
4849
core.debug("Compressed folder into zip " + webPackage);
4950
core.debug("Initiated deployment via kudu service for webapp package : " + webPackage);
50-
this.deploymentID = yield this.kuduServiceUtility.deployUsingZipDeploy(webPackage);
51+
this.deploymentID = yield this.kuduServiceUtility.deployUsingZipDeploy(webPackage, { slotName: this.actionParams.slotName });
5152
break;
5253
case packageUtility_1.PackageType.zip:
5354
core.debug("Initiated deployment via kudu service for webapp package : " + webPackage);
54-
this.deploymentID = yield this.kuduServiceUtility.deployUsingZipDeploy(webPackage);
55+
this.deploymentID = yield this.kuduServiceUtility.deployUsingZipDeploy(webPackage, { slotName: this.actionParams.slotName });
5556
break;
5657
default:
5758
throw new Error('Invalid App Service package or folder path provided: ' + webPackage);
@@ -75,5 +76,14 @@ class WebAppDeploymentProvider extends BaseWebAppDeploymentProvider_1.BaseWebApp
7576
}
7677
});
7778
}
79+
UpdateDeploymentStatus(isDeploymentSuccess) {
80+
return __awaiter(this, void 0, void 0, function* () {
81+
if (!!this.appService) {
82+
yield AnnotationUtility_1.addAnnotation(this.actionParams.endpoint, this.appService, isDeploymentSuccess);
83+
}
84+
console.log('App Service Application URL: ' + this.applicationURL);
85+
core.setOutput('webapp-url', this.applicationURL);
86+
});
87+
}
7888
}
7989
exports.WebAppDeploymentProvider = WebAppDeploymentProvider;

0 commit comments

Comments
 (0)