Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Meni 273 posts 530 karma points
    Mar 01, 2023 @ 05:34
    Meni
    0

    How to create CI/CD Build and Deployment Pipeline for Umbraco 11 website ?

    Hi, Is anyone has maybe a sample YAML file to deploy Umbraco 11 on Azure ?

    There's this one from the docs, but it seems it uses the Umbraco Deploy package.

    https://docs.umbraco.com/umbraco-deploy/installing-deploy/cicd-pipeline/ci-cd-azure-dev-ops

    I need something simple that will only deploy Views / Macro Partials, etc. every time I update my website, or if I want to test / deploy a different branch, so I'll not have to copy-paste to the .ftp every time

    Thanks

  • Conor Howe 36 posts 137 karma points
    Mar 01, 2023 @ 09:50
    Conor Howe
    0

    Hi Meni,

    The pipeline provided in the URL will still do the job, you would just have to remove the Umbraco Deploy PowerShell task and the variables etc around it.

    If you are just copying the views and assuming these are not compiled you will most likely not need the vsbuild task, but if you do it may be worth using the dotnetCli tasks instead. Just to copy over the views folder I would suggest using something like PowerShell to copy the views folder, zip it (there are tasks for this), then deploy the zip via ZipDeploy in the AzureWebApp task. I.e:

    - task: AzureWebApp@1
    displayName: 'Deploy code'
    inputs:
      azureSubscription: '<service connection>'
      appName: '<The app to deploy to>'
      package: '<Your zip file>'
      deploymentMethod: zipDeploy
    

    You will be able to deploy any branch out of Azure DevOps when you run the pipeline. There will be a dropdown box allowing you to select a new branch.

    If you create a new pipeline in Azure DevOps it will give you templates you can use to start you off. Then you can add new tasks / remove tasks from the assistant panel until you get something that you need

  • James Cordrey 11 posts 113 karma points
    Mar 01, 2023 @ 13:47
    James Cordrey
    0

    I do a build pipeline and a release pipeline, myself using Azure App Service Deploy.

    For what you're looking for (RE: moving some pieces over at a time) your Build Pipeline might look like this:

    enter image description here

    Note - In my full deploy, I have my publish agent set to zip the contents of the folder so that I can do an Azure App Service Deploy.

    Since you only want to move some files over, you'll want to do an FTP Upload, selecting the folder you want to upload, and the correct location on your server - probably will look like this:

    Root folder
        $(System.DefaultWorkingDirectory)/{BuildPipelineName}/drop/Views
    Remote directory
        $(Build.BuildId)/Views
    

    You can set up multiple different stages in a release pipeline with different options in them, depending on what you want to do - full deploy, views, macros, whatever.

    For a full deploy, I use Azure App Service Deploy - connected to my app service using a service connection managed in devops. (Connection Type: Azure Resource Manager) This is intended to move a zipped file over and unzip it, though, so if you don't zip your files during the build, you'll want to add an archive agent before you do an Azure App Service Deploy.

    Hope this helps!

Please Sign in or register to post replies

Write your reply to:

Draft