KuduClientZipExtensions.

ZipDeployStream(IKuduClient, Stream) Method

Summary

Deploys zip stream Kudu website.

Syntax

public static void ZipDeployStream(this IKuduClient client, Stream sourceStream)

Examples

 #addin nuget:?package=Cake.Kudu.Client

 string  baseUri     = EnvironmentVariable("KUDU_CLIENT_BASEURI"),
         userName    = EnvironmentVariable("KUDU_CLIENT_USERNAME"),
         password    = EnvironmentVariable("KUDU_CLIENT_PASSWORD");

 IKuduClient kuduClient = KuduClient(
     baseUri,
     userName,
     password);

 DirectoryPath sourceDirectoryPath = "./Documentation/";
 FilePath zipFilePath = "./Documentation.zip";

 Zip(sourceDirectoryPath, zipFilePath);

 using(Stream sourceStream = kuduClient.FileSystem.GetFile(zipFilePath).OpenRead())
 {
     kuduClient.ZipDeployStream(
        sourceStream);
 }

Parameters

Name Type Description
client IKuduClient The Kudu client.
sourceStream Stream The source stream.

Return Value

Type Description
void