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.

Use Git and a .deployment File to Deploy an Orchard CMS Precomplied Build to a Windows Azure Website

Tags: git, orchard-cms

Note: while this works, it isn't a best practice for continuous delivery, because it adds build results to the repository.

  • Clone the Orchard Source into SomeDirectory.
  • Add a .deployment file to SomeDirectory (from powershell, ni – t file –n .deployment)
  • SomeDirectory will now contain:
    .git 
    .deployment 
    lib 
    src 
    .gitignore 
    build.cmd 
    ClickToBuild.cmd 
    ClickToBuildAzurePackage.cmd 
    CREDITS.txt 
    DeleteModuleBinaries.cmd 
    LICENSE.txt 
    Orchard.proj
  • Open a Developer Command prompt at SomeDirectory. Run build precompiled. It’ll add these two new folders to SomeDirectory.
    build 
    buildtasks
  • Open your .deployment file. Add the following
    [config] 
    project = build/precompiled

    • Note: If you have a .gitignore file that ignores the build/ directory, you must ask git to force add everything from the precompiled folder (except App_Data and Media, because they will contain live stuff that we add from the Orchard UI)
      git add -f bin/*
      git add -f Config/*
      git add -f Core/*
      git add -f Modules/*
      git add -f Themes/*
      git add -f CREDITS.txt
      git add -f Global.asax
      git add -f LICENSE.txt
      git add -f Refresh.html
      git add -f Web.config
      (Yes. Git is case sensitive).
      
    • Finally, create a new Windows Azure website with deployment from version control > GitHub > etc.
    • If you’ve followed the steps above, and check out your Azure Website through FTP, you should see the following: 

    image

    • This is what it will look like online:

    image

    Resources

    https://github.com/projectkudu/kudu/wiki/Customizing-deployments (.deployment)

    http://msdn.microsoft.com/en-us/library/ms229859%28v=vs.110%29.aspx (Developer Command Prompt)