Umbraco Cloud
CMSHeartcoreDXPMarketplace
  • What is Umbraco Cloud?
  • Frequently asked questions
  • Security
    • Web Application Firewall
  • Sustainability Best Practices
  • Getting Started
    • Explore Umbraco Cloud
    • The Cloud Portal
      • Organizations
      • Sustainability Dashboard
    • Project Overview
    • Environments
    • Flexible Environments (beta)
    • Baselines
      • Baseline Merge Conflicts
      • Break Reference between Baseline and Child Project
      • Handling configuration files
      • Pushing Upgrades to a Child Project
    • Plans
    • Migrate to Umbraco Cloud
    • Repositories in a Cloud Project
    • Best Practice for Working in Teams
    • Migrate between regions
  • Set up
    • Ready to Set Up Your Project?
    • Working with a Local Clone
      • Legacy Umbraco Visual Studio Setup
    • Manage Environments
    • Project Settings
      • Managing Transport Security
      • CDN Caching and Optimizations
      • Dedicated Resources
      • Upgrade your Plan
      • Public Access
      • Managing Hostnames
        • New Certificate Authority for custom hostnames
        • Rewrite rules
        • Custom Certificates
      • Management API Security
      • Umbraco CI/CD Flow
        • Cloud API For CI/CD Flow
        • Configuring a CI/CD pipeline
          • Azure DevOps
          • GitHub Actions
        • Troubleshooting
        • Known Limitations and Considerations
      • External Services
      • Usage
        • Bandwidth
      • Availability and Performance
      • Team Members
        • Technical Contact
      • Secrets Management
      • Project History
    • Private NuGet Feed on Umbraco Cloud
    • Going Live
    • Media
    • External Login Providers
    • Azure Blob Storage
      • Connect to Azure Storage Explorer to upload files manually
      • Connect and Upload Files Programmatically to Azure Blob Storage
    • Users
    • Multi-Factor Authentication
    • Application Insights
    • Config Transforms
    • SMTP Settings
    • Payments
      • Subscription migration information and FAQ
    • Power Tools (Kudu)
      • View the Files on your Cloud Environments
      • Generate UDA files
      • Manually run Extractions on your Cloud Environments
  • Deployments
    • Deployment
    • Deploying between environments
    • Transferring Content, Media, Members, and Forms
    • Deploying Deletions
    • Deployment Webhook
    • Deploying Changes
    • Umbraco Forms on Cloud
    • Deploy Dashboard
    • Hotfixes
      • Apply hotfix by manually moving files
      • Apply hotfix by using Git
    • Restoring Content
      • Partial Restores
  • Databases
    • Keep Your Data Secure and Accessible
    • Working with databases
    • Database backups
    • Database
      • Connecting to the Database on Mac
    • Working with a Cloud database locally
  • Product Upgrades
    • Stay Up to Date with Umbraco Cloud
    • Product Upgrades
    • Major Upgrades
    • Minor Upgrades
    • Version Specific Upgrades
      • Migrate from Umbraco 8 to the latest version
      • Migrate from Umbraco 7 to Umbraco 8 on Umbraco Cloud
    • Upgrade your projects manually
      • Manual upgrade of Umbraco CMS
      • Manual upgrade of Umbraco Deploy
    • Dependencies on Umbraco Cloud
  • Troubleshooting
    • Resolve Issues Quickly and Efficiently
    • Troubleshooting FAQ
    • Log files
    • The Umbraco Backoffice
    • The Frontend
    • The Umbraco Cloud Portal
    • Site Performance checklist
    • Troubleshooting deployments
      • Extraction error: Config transforms failing
      • Extraction error: Data Type collisions
      • Dependency Exception
      • Merge Conflicts on Flexible Environments
      • Troubleshooting deployments failing with no error message
      • Troubleshooting duplicate dictionary items
      • Troubleshooting language mismatches
      • Path too long Exception
      • Schema Mismatches
      • How to resolve collision errors
      • Extraction error: "Type not found! "
    • Cloud Errors
  • Release Notes
    • Overview 2025
      • April 2025
      • March 2025
      • February 2025
      • January 2025
    • Overview 2024
      • December 2024
      • November 2024
      • October 2024
      • September 2024
      • August 2024
      • July 2024
      • May 2024
      • April 2024
      • March 2024
      • February 2024
      • January 2024
    • Overview 2023
      • December 2023
      • October 2023
      • September 2023
      • August 2023
      • June 2023
      • May 2023
      • April 2023
      • March 2023
      • February 2023
      • January 2023
    • Overview 2022
      • December 2022
      • November 2022
      • September 2022
      • August 2022
      • June 2022
      • May 2022
      • April 2022
      • March 2022
      • February 2022
      • January 2022
Powered by GitBook
On this page
  • Import Cloud project repository to Azure DevOps
  • Set up the Azure DevOps pipeline files
  • Configure Azure DevOps
  • Optional: Test the pipeline
  • High level overview of the pipeline components
  • Main
  • Cloud-sync
  • Cloud-deployment
  • Further information

Was this helpful?

Edit on GitHub
Export as PDF
  1. Set up
  2. Project Settings
  3. Umbraco CI/CD Flow
  4. Configuring a CI/CD pipeline

Azure DevOps

This section provides a step-by-step guide to setting up a CI/CD pipeline in Azure DevOps using the provided sample Bash or Powershell scripts.

PreviousConfiguring a CI/CD pipelineNextGitHub Actions

Last updated 2 months ago

Was this helpful?

Before setting up the pipeline in Azure DevOps, make sure that the following steps from the are done:

  • Pick a Cloud project

  • Activate CI/CD Flow

Next, you will need to define your pipeline in YAML and use it to interact with the Umbraco Cloud API.

The Umbraco CI/CD Team has created a sample pipeline for Azure DevOps.

The Scripts are provided as is. This means that the scripts will do the bare minimum for a pipeline that is utilizing the CI/CD flow.

You'll need to adapt and integrate the script into your own pipelines to gain the ability to do deployments to your Umbraco Cloud projects.

The sample includes YAML-files and custom Powershell and Bash scripts to interact with the Umbraco Cloud API.

You can get the samples for both Azure DevOps and GitHub Actions from the .

Please be aware that since this involves using your custom pipeline, any issues that arise will need to be resolved by you.

Import Cloud project repository to Azure DevOps

Go to your repositories in Azure DevOps and click on "Create a repository".

  • Create a new empty repository (don't add a README and don't add a .gitignore), and note down the clone URL.

  • Go to the Umbraco Cloud Portal and clone your cloud project down locally. describes how you can find the clone URL.

  • Now working locally remove the Git Remote called origin, which currently points to Umbraco Cloud

git remote remove origin
  • Optionally rename branch master to main

# optional step
git branch -m  main
git symbolic-ref HEAD refs/heads/main
  • Add a new remote called origin and pointing to the Azure DevOps clone URL and push

git remote add origin https://{your-organization}@dev.azure.com/{your-organization}/{azure-project-scope}/_git/{your-repository}
git push -u origin --all

Now we can move on to setting up a pipeline.

Set up the Azure DevOps pipeline files

Select your preferred scripting language:

For a pipeline that uses Powershell scripts you will need the following files:

  • From the root folder

    • cloud.zipignore

  • From the powershell folder

    • Get-LatestDeployment.ps1

    • Get-ChangesById.ps1

    • New-Deployment.ps1

    • Add-DeploymentPackage.ps1

    • Start-Deployment.ps1

    • Test-DeploymentStatus.ps1

  • From the powershell/azuredevops folder

    • azure-release-pipeline.yml

    • cloud-sync.yml

    • cloud-deployment.yml

Do the following to prepare the pipeline:

  • Copy the cloud.zipignore file to the root of your repository

  • Make a copy of the .gitignore from your repository and call the copy cloud.gitignore

    • Both files should be in the root of your repository

    • In the bottom of the .gitignore file add the line **/git-patch.diff

  • Also in the root, create a folder called devops

  • Copy the 3 YAML files from the powershell/azuredevops folder into the devops folder

  • Inside devops create an additional folder called powershell

  • Copy the Powershell scripts from the powershell folder to the powershell folder

  • Note: If you have not changed the branch to main, then in the azure-release-pipeline.yaml file change the branch from mainto master.

  • Commit all changes, and push to Azure DevOps

For a pipeline that uses Bash scripts you will need the following files:

  • From the root folder

    • cloud.zipignore

  • From the bash folder

    • get_latest_deployment.sh

    • get_changes_by_id.sh

    • create_deployment.sh

    • upload_package.sh

    • start_deployment.sh

    • get_deployment_status.sh

  • From the bash/azuredevops folder

    • azure-release-pipeline.yml

    • cloud-sync.yml

    • cloud-deployment.yml

Do the following to prepare the pipeline:

  • Copy the cloud.zipignore file to the root of your repository

  • Make a copy of the .gitignore from your repository and call the copy cloud.gitignore

    • Both files should be in the root of your repository

    • In the bottom of the .gitignore file add the line **/git-patch.diff

  • Also in the root, create a folder called devops

  • Copy the 3 YAML files from the bash/azuredevops folder into the devops folder

  • Inside devops create an additional folder called scripts

  • Copy the Bash scripts from the bash folder to the scripts folder

  • Note: If you have not changed the branch to main, then in the azure-release-pipeline.yaml file change the branch from mainto master.

  • Commit all changes, and push to Azure DevOps

Configure Azure DevOps

  • Now go to the repository in Azure and click on "Set up build".

  • On the next screen click on "Existing Azure Pipelines YAML file"

  • Select main (or master if you did not change the branch name) in Branch

  • Select /devops/azure-release-pipeline.yaml in Path and continue

  • Now you are on the "Review your pipeline YAML" screen

    • Replace the ##Your project Id here## with the Project Id you got from Umbraco Cloud Portal

    • Click on "Variables"

  • Add the variable umbracoCloudApiKey with the value of the API Key you got from Umbraco Cloud Portal

It is recommended to handle the API Key as a secret. This can be done by ticking the "Keep this value secret" checkbox.

You can customize the names for the variables as you like, however, you then need to rename the affected variables in azure-release-pipeline.yaml.

Check the references to the variables in the yaml files match the variable syntaxes in the created variable. Example: umbracoCloudApiKey = UMBRACOCLOUDAPIKEY.

When you click on "Save and Run" your first deployment will be triggered. Which means that Azure DevOps is set up with all the needed information to be able to deploy your Cloud project back to Umbraco Cloud.

Optional: Test the pipeline

With everything set up, you may want to confirm that Umbraco Cloud reflects the changes you are sending via your pipeline.

While working on your project locally, add a new Document type.

  • Commit the change to main branch (or master if you did not change the branch name) and push to your repository.

  • The pipeline starts to run

  • Once the pipeline is done log into Backoffice on your left-most environment in Umbraco Cloud

  • Go to the Settings section and see that your new Document type has been deployed

High level overview of the pipeline components

The mentioned scripts are provided as a starting point. It is recommended that you familiarize yourself with the scripts and with documentation related to how to use Azure DevOps.

The scripts demonstrates the following:

  • How to deploy changes to the left-most project environment in Umbraco Cloud

Main

The azure-release-pipeline.yaml is the main pipeline, and is the one that will be triggered on a push to main branch. You can configure a different trigger behavior in this file.

You can add your Build and Test stage between the cloudSyncStage and cloudDeploymentStage stages. Keep in mind that you do not need to retain the dotnet build artifact for upload later. The cloudDeploymentStage job will take care of packaging all your source code and upload to Umbraco Cloud.

Cloud-sync

The cloud-sync.yml shows how you can sync your Azure DevOps repository with the left-most environment of your Cloud project. In this sample, it accepts any change from the API and applies and commits it back to the branch which triggered the pipeline. However the commit does not trigger the pipeline again.

If you don't want the pipeline to commit back to the triggering branch, this is where you need to change the pipeline.

Cloud-deployment

The cloud-deployment.yml shows how you can deploy your repository to the left-most environment of your Cloud project. The sample shows how to prepare for deployment, request the deployment and wait for cloud to finish.

There are a couple of things here to be aware of:

  • We are overwriting the .gitignore file with cloud.gitignore. This is a way to accommodate your gitignore-needs when working locally. For instance you might want to ignore frontend builds, but you want them build and published to cloud.

  • We have a special cloud.zipignore file. This is a convenient way to tell the pipeline which files not to include when creating the zip package to send to cloud.

If you have frontend assets that needs to be built (using tools like npm/yarn or others), you should add the needed steps before Zip Source Code. This is to ensure that the fresh frontend assets will be part of the package to be sent to Umbraco Cloud.

Further information

While working with the project on your local machine, follow these steps to prepare the pipeline, using the .

Download the provided sample scripts as ZIP from the . Click on "Code" and then choose "Download ZIP". Then unzip it and use those files for the next steps.

The pipeline needs to know which Umbraco Cloud project to deploy to. In order to do this you will need the Project ID and the API Key. describes how to get those values.

How to sync your Azure DevOps repository with the in Umbraco Cloud

samples from the repository
GitHub repository
left-most project environment
Azure Pipelines Documentation
Configuring a CI/CD pipeline
GitHub repository
This article
Azure DevOps Repository
Configure pipeline with existing YAML file
Select Branch and Path
Pipeline variables in Azure DevOps
This article