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
)
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
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");
Related posts
This post is licensed under a Creative Commons Attribution 4.0 International License