KuduClientZipExtensions.

ZipRunFromDirectory(IKuduClient, DirectoryPath, bool, string, string) Method

Summary

Deploy local directory to KuduWebsite as read only Zip file system.

Syntax

public static FilePath ZipRunFromDirectory(this IKuduClient client, DirectoryPath localPath, bool skipPostDeploymentValidation, string relativeValidateUrl = null, string expectedValidateValue = null)

Examples

 git teUrl             = $"/api/GetVersion?version={expectedValidateValue}";

 FilePath deployFilePath = kuduClient.ZipRunFromDirectory(
                                         sourceDirectoryPath,
                                         skipPostDeploymentValidation,
                                         relativeValidateUrl,
                                         expectedValidateValue);

 Information("Deployed to {0}", deployFilePath);

Remarks

You app service needs to have the setting WEBSITE_RUN_FROM_ZIP set to 1 for Kudu to pickup your publish.

Parameters

Name Type Description
client IKuduClient The Kudu client.
localPath DirectoryPath The local directory path.
skipPostDeploymentValidation bool Flag for if post deployment validation should be done.
relativeValidateUrl string The relative url used for validation (default: "KuduClientZipRunFromDirectoryVersion.txt").
expectedValidateValue string The expected value returned from validation url (default zip file name).

Return Value

Type Description
FilePath The path of deployed Zip.