Welcome to Shaun Luttin's public notebook. It contains rough, practical notes. The guiding idea is that, despite what marketing tells us, there are no experts at anything. Sharing our half-baked ideas helps everyone. We're all just muddling thru. Find out more about our work at bigfont.ca.
This is a poor man's continuous integration solution, for those who don't want to pay for Team City.
TLDR; Fork me on GitHub
Be sure to read the readme on GitHub and/or the rest of this blog post for details. Here is a link to the GitHub repo:
- Clone the Orchard source.
- Keep your company's Orchard work in a Git repository.
- Exclude all build results from the repo using
- Setup continuous deployment from Git to a MS Azure Website.
Lightweight Continuous Integration with Kudu
Here is a high level view of the steps to setting up CI with Kudu. We're running all scripts from PowerShell with Posh-Git.
Install the Azure command line interface
npm install azure-cli -g
Create an out-of-the-box azure deployment script
azure site deploymentscript --aspWAP Orchard.proj -s src\Orchard.sln
There will now be a
.deployment file in your root folder. That file points to a more involved
deploy.cmd file. You must edit the
deploy.cmd file so that Kudu uses Orchard's
build Precompiled targets and build results. Doing so is easier said than done! I suggest using this file as an example.
Once you're done
If you FTP into the
/site directory, you will see the following:
deployments (deployment logs and statuses - very useful) diagnostics locks repository (the last checkout of the appropriate repo) wwwroot (the result of the kudu deploy.cmd; in this case, the build/precompiled)
Gotchas and tips
- If your build takes a long time, lengthen the
SCM_COMMAND_IDLE_TIMEOUTin the Azure Website App Settings.
- When testing locally, be sure to install and to update nuget on the command line, e.g.
nuget update -self
- The integration build can take a looooong time (the above is about 20 minutes), even when changes are minor (e.g. if we change the readme file). Try to reduce this over time.