Configuring a CI/CD pipeline
Last updated
Last updated
Learn how to configure a CI/CD pipeline in Azure DevOps and GitHub Actions Workflows using the sample scripts provided.
You'll find example shell scripts and pipeline configurations in the Sample scripts section, covering both Azure DevOps and GitHub Actions Workflows.
Samples are provided "AS IS" to get you started. Please familiarize yourself with them, and feel free to change them to fit your needs.
Umbraco Cloud repositories are not meant to be used as source code repositories. More details here.
Once you commit your code to Cloud the build pipeline converts your C# code to DLLs and deploys it on the respective environment.
In Umbraco Cloud only C# code is built, and all frontend artifacts need to be built and committed to the repository.
You can use Azure DevOps as an external repository and with the pipelines, it will automatically keep your Azure DevOps source code repository in sync. The sync is done with the git repository of Umbraco Cloud of the development environment.
Before proceeding, you'll need an Umbraco Cloud project and a CI/CD pipeline. You will also need the required files to add to your pipeline for successful interaction with the Umbraco Cloud API.
Pick an Umbraco Cloud project, preferably with a development environment (but not a requirement)
Create a new Umbraco Cloud Project.
You can take a trial here
Create a new project in the Umbraco Cloud Portal
Use one of your existing projects.
Create a new or an existing CI/CD pipeline in Azure DevOps or GitHub Actions.
In this guide, deployments are targeted at the leftmost environment in your Umbraco Cloud setup. This means if you have a Development environment, it will be automatically selected for deployment. If no Development environment exists, the Live environment will be used.
To get started with API interactions, you'll need to obtain your Project ID and API key. If you haven't already enabled the CI/CD feature, follow these steps:
Navigate to the Umbraco Cloud Portal and select your project.
Go to Settings
-> Advanced
. This is where you can generate an API key and find your Project ID.
Click on "Activate CI/CD Flow" toggle to enable the feature.
The API key is tied to the specific project for which it is generated. Make sure to keep it secure in Azure or GitHub, as it will be used for all subsequent API interactions related to that project.
Below we have a couple of examples of how to set up a CI/CD Pipeline using either Azure DevOps or GitHub Actions.
Each guide describes:
How to set up a new repository in either GitHub or Azure DevOps
Get a copy of your Umbraco Cloud project into that repository
And finally how to configure a new pipeline using the provided samples
The sample pipelines are using either Bash-scripts or Powershell-scripts to facilitate communication with the Umbraco CI/CD API.
During the guides, you will have the option to choose between Powershell or Bash scripts. We recommend that you choose the scripting technology you feel most comfortable with.
Details the setup of a CI/CD pipeline using Azure DevOps.
Details the setup of a CI/CD pipeline using GitHub Actions.