Skip to content

Commit

Permalink
Adding commit message to zipDeploy payload (#127)
Browse files Browse the repository at this point in the history
* added commit message to zipDeploy payload

* added commit message to zipDeploy payload

* Added input field to the action.yml

* removed node_modules

* removed nodemodules

* Removed node_modules from source code

* Users/balaga gayatri/commit message fix (#125)

* added commit message to zipDeploy payload

* added commit message to zipDeploy payload

* Added input field to the action.yml

* removed node_modules

* removed nodemodules

* Removed node_modules from source code

* removed taking input through action.yml

* removed node_modules after testing

* Users/balaga gayatri/commit message fix (#126)

* added commit message to zipDeploy payload without action.yml input

* Update action.yml

* Removing formatting

* removed whitespaces

* adding node_modules

* adding node_modules

* debugging for head_commit message

* debugging for head_commit message

* debugging for head_commit message

* debugging for head_commit message

* Added empty commit message for non push github event

* Update main.ts

* Update main.ts

* Users/balaga gayatri/commit message fix (#131)



* Added empty commit message for non push github event

* changes

* added node_modules

* node_modules

* updated lib file

* whitespace changes
  • Loading branch information
BALAGA-GAYATRI authored Jun 14, 2021
1 parent 05e3bec commit 03ca72b
Show file tree
Hide file tree
Showing 7 changed files with 490 additions and 212 deletions.
8 changes: 4 additions & 4 deletions lib/DeploymentProvider/Providers/WebAppDeploymentProvider.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,25 +34,25 @@ class WebAppDeploymentProvider extends BaseWebAppDeploymentProvider_1.BaseWebApp
case packageUtility_1.PackageType.war:
core.debug("Initiated deployment via kudu service for webapp war package : " + webPackage);
var warName = utility.getFileNameFromPath(webPackage, ".war");
this.deploymentID = yield this.kuduServiceUtility.deployUsingWarDeploy(webPackage, { slotName: this.actionParams.slotName }, warName);
this.deploymentID = yield this.kuduServiceUtility.deployUsingWarDeploy(webPackage, { slotName: this.actionParams.slotName, commitMessage: this.actionParams.commitMessage }, warName);
break;
case packageUtility_1.PackageType.jar:
core.debug("Initiated deployment via kudu service for webapp jar package : " + webPackage);
let folderPath = yield utility.generateTemporaryFolderForDeployment(false, webPackage, packageUtility_1.PackageType.jar);
let output = yield utility.archiveFolderForDeployment(false, folderPath);
webPackage = output.webDeployPkg;
this.deploymentID = yield this.kuduServiceUtility.deployUsingZipDeploy(webPackage, { slotName: this.actionParams.slotName });
this.deploymentID = yield this.kuduServiceUtility.deployUsingZipDeploy(webPackage, { slotName: this.actionParams.slotName, commitMessage: this.actionParams.commitMessage });
break;
case packageUtility_1.PackageType.folder:
let tempPackagePath = utility.generateTemporaryFolderOrZipPath(`${process.env.RUNNER_TEMP}`, false);
webPackage = (yield zipUtility.archiveFolder(webPackage, "", tempPackagePath));
core.debug("Compressed folder into zip " + webPackage);
core.debug("Initiated deployment via kudu service for webapp package : " + webPackage);
this.deploymentID = yield this.kuduServiceUtility.deployUsingZipDeploy(webPackage, { slotName: this.actionParams.slotName });
this.deploymentID = yield this.kuduServiceUtility.deployUsingZipDeploy(webPackage, { slotName: this.actionParams.slotName, commitMessage: this.actionParams.commitMessage });
break;
case packageUtility_1.PackageType.zip:
core.debug("Initiated deployment via kudu service for webapp package : " + webPackage);
this.deploymentID = yield this.kuduServiceUtility.deployUsingZipDeploy(webPackage, { slotName: this.actionParams.slotName });
this.deploymentID = yield this.kuduServiceUtility.deployUsingZipDeploy(webPackage, { slotName: this.actionParams.slotName, commitMessage: this.actionParams.commitMessage });
break;
default:
throw new Error('Invalid App Service package or folder path provided: ' + webPackage);
Expand Down
8 changes: 8 additions & 0 deletions lib/actionparameters.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
};
Object.defineProperty(exports, "__esModule", { value: true });
const core = __importStar(require("@actions/core"));
const github = require('@actions/github');
var WebAppKind;
(function (WebAppKind) {
WebAppKind[WebAppKind["Windows"] = 0] = "Windows";
Expand All @@ -31,6 +32,7 @@ class ActionParameters {
this._images = core.getInput('images');
this._multiContainerConfigFile = core.getInput('configuration-file');
this._startupCommand = core.getInput('startup-command');
this._commitMessage = github.context.eventName === 'push' ? github.context.payload.head_commit.message : "";
this._endpoint = endpoint;
}
static getActionParams(endpoint) {
Expand All @@ -42,6 +44,12 @@ class ActionParameters {
get appName() {
return this._appName;
}
get commitMessage() {
return this._commitMessage;
}
set commitMessage(commitMessage) {
this._commitMessage = commitMessage;
}
get packageInput() {
return this._packageInput;
}
Expand Down
Loading

0 comments on commit 03ca72b

Please sign in to comment.