Skip to content

CI/CD V2 endpoints #7142

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 25 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
2f603a4
add something
jesp209i May 28, 2025
bff82b1
Merge branch 'main' into task/cicd-v2-docs
jesp209i May 28, 2025
1326734
Merge branch 'main' into task/cicd-v2-docs
jesp209i Jun 3, 2025
5c469f8
update the picture
jesp209i Jun 3, 2025
ccc8fb5
Add artifact best practice article
jesp209i Jun 3, 2025
cbeb7e7
Add description of how to get environment alias
jesp209i Jun 4, 2025
365cb3d
tweaks to the v2 endpoints article
jesp209i Jun 4, 2025
9983af1
Move old articles to V1-prefix
jesp209i Jun 4, 2025
1dadf38
Add azure devops description
jesp209i Jun 4, 2025
0bfcd37
switch the UmbracoCloudApi docs
jesp209i Jun 4, 2025
f7622b9
Target v2 on guides
jesp209i Jun 4, 2025
5838ff8
Merge branch 'main' into task/cicd-v2-docs
jesp209i Jun 4, 2025
d822cfe
fix mistakes on api doc
jesp209i Jun 4, 2025
6b005b4
Flow on Sample intro
jesp209i Jun 4, 2025
ffc5f54
fix the mention of Azure DevOps on GitHub Actions examples
jesp209i Jun 4, 2025
457cb00
typo
jesp209i Jun 5, 2025
e9107b5
Fix reviewdog highlights
jesp209i Jun 5, 2025
7b5142d
Fix todo/ update description regarding links
jesp209i Jun 6, 2025
c3f74bb
add placeholder migration article
jesp209i Jun 6, 2025
5957687
Azure DevOps CICD migrate to V2
jesp209i Jun 10, 2025
f1a1b1e
GitHub CICD migrate to V2
jesp209i Jun 10, 2025
3b8b24f
fix reviewdog comments
jesp209i Jun 10, 2025
9ccec47
Clarify sample location
jesp209i Jun 10, 2025
4537765
remove flexible environment restriction info box
jesp209i Jun 11, 2025
8393ecd
Merge remote-tracking branch 'origin' into task/cicd-v2-docs
jesp209i Jun 11, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified umbraco-cloud/set-up/images/Advanced-Section.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Deployment Artifact best practice
The zip package you are deploying needs to contain all things that normally is present in an Umbraco Cloud environment-repository.

Every new Umbraco Cloud project contains a readme.md file which explains the structure and how you can adapt it to suit your needs.

The sample scripts on GitHub includes a way to package the zip. As the scripts are samples they show a universal way to do this which works well for most people. But not all projects are alike, and you may not want to use that particular approach.

## Do not include Dotnet Binaries
Don’t include any binary build artifacts coming from the DotNet build/publish process.

The general deployment process on Umbraco Cloud needs the source code and the system will rebuild it once it is pushed back to the environment.

## Do not include the .git directory
The folder will be ignored in the isolated instance, including the extra megabytes will slow down the deployment process.

Also consider the artifact size limitation below.

## Do include the finished frontend assets
If you are using modern frontend build tools, ideally only include the finished frontend assets that are needed. No need to include JavaScript or TypeScript source files if you need to build the frontend.

## Keep the Artifact as small as possible
It is good practice to keep the zipped artifact as small as possible.
* Large files will slow down the underlying git operations and therefore also the deployment process.
* Do not include large files like pictures and pdf’s in the artifact.
* Large files need to be uploaded to the blob storage connected to your environment.
* Remove old and leftover code from the artifact.
* Orphaned Csproj-files with outdated package-references are common causes for issues in the deployment process.

Size limitations to consider:
- The V1 endpoint will allow file sizes up to 128 MB.
- In the V2 endpoint we have increased the size limit to 256 MB.
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@

As we continue to gather insights from our users, there are some known limitations and considerations to be aware of.

{% hint style="info" %}
Attaching a CI/CD pipeline to a flexible environment is currently not possible. The CI/CD workflow must go through the mainline deployment workflow.
{% endhint %}

## Potential Limitations and Considerations

**Format Restrictions**
Expand Down
112 changes: 112 additions & 0 deletions umbraco-cloud/set-up/project-settings/umbraco-cicd/Migrate.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
# Migrate from V1 to V2
We wanted to improve on the original flow based on all the feedback received from users of the feature.

Here we will go through how to migrate from V1 samples to V2 samples.

{% hint style="info" %}
Be advised that both scripts and pipeline files have changes.

Familiarize you self with the new samples.

If you customized the flow or the V1 scripts please take extra care to incorporate your changes.
{% endhint %}

You keep using the old endpoints and samples, but you will miss out on the enhancements. We currently don't have any plans to deprecate the V1 endpoints.

## What has changed?
The biggest enhancement is the ability to target different environments. You are now able to target the flexible and the leftmost mainline environment.
We have created new endpoints to accommodate this enhancement, meaning you will have to supply a target environment alias in some requests.

Also the initial flow has been slightly changed. The upload of a deployment package is no longer tied to a "deployment-meta", but is now a separate step. Every uploaded artifact can be queried by the api, similar to querying deployments via the api.

When you request a deployment you now also need to supply an artifactId. Also more options are available when deploying.

To showcase how to use the new V2 endpoints and flow, we have created some updated samples.

# Migrate Azure DevOps
Start by deleting the scripts and yaml files you initially got from the CI/CD samples:
- Delete the Yaml/yml:
- `azure-release-pipeline.yaml`
- `cloud-sync.yml`
- `cloud-deployment.yml`

You probably only have either PowerShell or Bash.
- PowerShell files to delete:
- `Add-DeploymentPackage.ps1`
- `Apply-Patch.ps1`
- `Get-ChangesById.ps1`
- `Get-LatestDeployment.ps1`
- `New-Deployment.ps1`
- `Start-Deployment.ps1`
- `Test-Deployment.ps1`
- Bash files to delete:
- `apply_patch.sh`
- `create_deployment.sh`
- `get_changes_by_id.sh`
- `get_deployment_status.sh`
- `get_latest_deployment.sh`
- `start_deployment.sh`
- `upload_package.sh`

Now copy the scripts from the sample repositorys V2 folder to the corresponding folder in you repo:
- If you prefer PowerShell:
- All .ps1 files in `V2/powershell` should be copied to `devops/powershell`
- All .yaml/.yml in `V2/powershell/azuredevops` should be copied to `devops`
- If you prefer Bash:
- All .sh files in `V2/bash` should be copied to `devops/scripts`
- All .yaml/.yml in `V2/bash/azuredevops` should be copied to `devops`

Now we need some important values: Project id and Target environment alias.
- [This section](./samplecicdpipeline/README.md#obtaining-the-project-id-and-api-key) explains how to get the project id.
- [This section](./samplecicdpipeline/README.md#getting-environment-aliases-to-target) explains how to get the environment alias.

Now open the `azure-release-pipeline.yaml` in your favorite editor.
You need to replace `##Your project Id here##` with the project Id and the value `##Your target environment alias here#` with the environment alias.

You can use any of the available aliases, but to get similar functionality as before you should select the environment described as `Leftmost mainline`.

# Migrate GitHub
Start by deleting the scripts and yaml files you initially got from the CI/CD samples:
- Delete the Yaml:
- `main.yml`
- `cloud-sync.yml`
- `cloud-deployment.yml`

You probably only have either PowerShell or Bash.
- PowerShell files to delete:
- `Add-DeploymentPackage.ps1`
- `Apply-Patch.ps1`
- `Get-ChangesById.ps1`
- `Get-LatestDeployment.ps1`
- `New-Deployment.ps1`
- `Start-Deployment.ps1`
- `Test-Deployment.ps1`
- Bash files to delete:
- `apply_patch.sh`
- `create_deployment.sh`
- `get_changes_by_id.sh`
- `get_deployment_status.sh`
- `get_latest_deployment.sh`
- `start_deployment.sh`
- `upload_package.sh`

Now copy the scripts from the sample repositorys V2 folder to the corresponding folder in you repo:
- If you prefer PowerShell:
- All .ps1 files in `V2/powershell` should be copied to `.github/powershell`
- All .yaml/.yml in `V2/powershell/github` should be copied to `.github/workflows`
- If you prefer Bash:
- All .sh files in `V2/bash` should be copied to `.github/scripts`
- All .yaml/.yml in `V2/bash/github` should be copied to `.github/workflows`

Now we need one important value: Target environment alias.
- [This section](./samplecicdpipeline/README.md#getting-environment-aliases-to-target) explains how to get the environment alias.

Go to your GitHub repository and enter the `Settings` section.
- In the left side menu find the `Security` section and click on `Actions`
- Click on the tab `Variables`
- Click on `New repository variable`
- Call the variable `TARGET_ENVIRONMENT_ALIAS`
- Use the environment alias as value
- Click on `Add variable`.

You can use any of the available aliases, but to get similar functionality as before you should select the environment described as `Leftmost mainline`.
Loading
Loading