Skip to content
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

fix for duplicate duployment issue #111

Merged
merged 1 commit into from
Mar 9, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
"dependencies": {
"@actions/core": "^1.2.6",
"actions-secret-parser": "^1.0.3",
"azure-actions-appservice-rest": "^1.2.9",
"azure-actions-appservice-rest": "^1.3.1",
"azure-actions-utility": "^1.0.3",
"azure-actions-webclient": "^1.0.11"
"azure-actions-webclient": "^1.1.0"
}
}
16 changes: 13 additions & 3 deletions src/DeploymentProvider/Providers/WebAppDeploymentProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import * as zipUtility from 'azure-actions-utility/ziputility.js';
import { Package, PackageType } from "azure-actions-utility/packageUtility";

import { BaseWebAppDeploymentProvider } from './BaseWebAppDeploymentProvider';
import { addAnnotation } from 'azure-actions-appservice-rest/Utilities/AnnotationUtility';

export class WebAppDeploymentProvider extends BaseWebAppDeploymentProvider {

Expand All @@ -30,20 +31,20 @@ export class WebAppDeploymentProvider extends BaseWebAppDeploymentProvider {
let folderPath = await utility.generateTemporaryFolderForDeployment(false, webPackage, PackageType.jar);
let output = await utility.archiveFolderForDeployment(false, folderPath);
webPackage = output.webDeployPkg;
this.deploymentID = await this.kuduServiceUtility.deployUsingZipDeploy(webPackage);
this.deploymentID = await this.kuduServiceUtility.deployUsingZipDeploy(webPackage, { slotName: this.actionParams.slotName });
AmrutaKawade marked this conversation as resolved.
Show resolved Hide resolved
break;

case PackageType.folder:
let tempPackagePath = utility.generateTemporaryFolderOrZipPath(`${process.env.RUNNER_TEMP}`, false);
webPackage = await zipUtility.archiveFolder(webPackage, "", tempPackagePath) as string;
core.debug("Compressed folder into zip " + webPackage);
core.debug("Initiated deployment via kudu service for webapp package : "+ webPackage);
this.deploymentID = await this.kuduServiceUtility.deployUsingZipDeploy(webPackage);
this.deploymentID = await this.kuduServiceUtility.deployUsingZipDeploy(webPackage, { slotName: this.actionParams.slotName });
break;

case PackageType.zip:
core.debug("Initiated deployment via kudu service for webapp package : "+ webPackage);
this.deploymentID = await this.kuduServiceUtility.deployUsingZipDeploy(webPackage);
this.deploymentID = await this.kuduServiceUtility.deployUsingZipDeploy(webPackage, { slotName: this.actionParams.slotName });
break;

default:
Expand All @@ -67,4 +68,13 @@ export class WebAppDeploymentProvider extends BaseWebAppDeploymentProvider {
core.debug(`Skipped updating appCommandLine. Current value is: ${currentStartupCommand}`);
}
}

public async UpdateDeploymentStatus(isDeploymentSuccess: boolean) {
if(!!this.appService) {
await addAnnotation(this.actionParams.endpoint, this.appService, isDeploymentSuccess);
AmrutaKawade marked this conversation as resolved.
Show resolved Hide resolved
}

console.log('App Service Application URL: ' + this.applicationURL);
core.setOutput('webapp-url', this.applicationURL);
}
}