Cake.Kudu.Client version 0.6.0 released

Published on Sunday, 3 June 2018

This version fixes a breaking change in the Azure App Services Run-From-Zip web app deployment feature.

App Service Changes

  • App Setting: WEBSITE_USE_ZIP --> WEBSITE_RUN_FROM_ZIP
  • Marker filename: siteversion.txt --> packagename.txt

Action you need to take

As the App Setting has change you’ll need to change you setting name to WEBSITE_RUN_FROM_ZIP (it’s value should still be 1 )

App Service App Settings

Maker filename is handled by the new version so all you need to update scripts to use Cake.Kudu.Client version 0.6.0.

#addin nuget:?package=Cake.Kudu.Client&version=0.6.0

nothing else needs to be changed in your Cake script.

Verifying change

You can verify the publish succeeded under App Service Advanced Tools ( Kudu ) — Debug Console by navigating to data/SitePackages and see deployment package and the new packagename.txt

Kudu Debug Console

Full example

If you haven’t used the feature before below is a full example

#addin nuget:?package=Cake.Kudu.Client&version=0.6.0

Task("Deploy-Run-From-Zip")
 .Does( ()=>
 {
    string  baseUri     = EnvironmentVariable("KUDU_CLIENT_BASEURI"),
            userName    = EnvironmentVariable("KUDU_CLIENT_USERNAME"),
            password    = EnvironmentVariable("KUDU_CLIENT_PASSWORD");

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

    DirectoryPath sourceDirectoryPath = "./website/";

    FilePath deployFilePath = kuduClient.ZipRunFromDirectory(sourceDirectoryPath);

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

 RunTarget("Deploy-Run-From-Zip");

Deploy Run From Zip Cake console output log

Related posts