Skip to content

Commit 5957687

Browse files
committed
Azure DevOps CICD migrate to V2
1 parent c3f74bb commit 5957687

File tree

1 file changed

+60
-11
lines changed
  • umbraco-cloud/set-up/project-settings/umbraco-cicd

1 file changed

+60
-11
lines changed
Lines changed: 60 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,68 @@
11
# Migrate from V1 to V2
2+
We wanted to improve on the original flow based on all the feedback received from users of the feature.
3+
4+
Here we will go through how to migrate from V1 samples to V2 samples.
5+
6+
{% hint style="info" %}
7+
Be advised that both scripts and pipeline files have changes.
28

3-
todo todo todo
9+
Familiarize you self with the new samples.
10+
11+
If you customized the flow or the V1 scripts please take extra care to incorporate your changes.
12+
{% endhint %}
13+
14+
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.
415

516
## What has changed?
6-
We wanted to improve on the original flow based on all the feedback received from users of the feature.
7-
Here are some of the highlights:
8-
- New endpoints
9-
- Target environment must be supplied on get-diff and deploy steps
10-
- More options when deploying
11-
- Rewritten scripts to target new endpoints
17+
The biggest enhancement is the ability to target different environments. You are now able to target the flexible and the leftmost mainline environment.
18+
We have created new endpoints to accommodate this enhancement, meaning you will have to supply a target environment alias in some requests.
19+
20+
Also the initial flow has been slightly changed. The upload of a deployment package is no longer tied to a "deployment-meta", but rather is a completely separate step. Every uploaded artifact can be queried by the api, similar to querying deployments via the api.
21+
22+
When you request a deployment you now also need to supply an artifactId. Also more options are available when deploying.
23+
24+
To showcase how to use the new V2 endpoints and flow, we have created some updated samples.
25+
26+
# Migrate Azure DevOps
27+
Start by deleting the scripts and yaml files you initially got from the CICD samples:
28+
- Delete the Yaml/yml:
29+
- `azure-release-pipeline.yaml`
30+
- `cloud-sync.yml`
31+
- `cloud-deployment.yml`
32+
33+
You probably only have either PowerShell or Bash.
34+
- PowerShell files to delete:
35+
- `Add-DeploymentPackage.ps1`
36+
- `Apply-Patch.ps1`
37+
- `Get-ChangesById.ps1`
38+
- `Get-LatestDeployment.ps1`
39+
- `New-Deployment.ps1`
40+
- `Start-Deployment.ps1`
41+
- `Test-Deployment.ps1`
42+
- Bash files to delete:
43+
- `apply_patch.sh`
44+
- `create_deployment.sh`
45+
- `get_changes_by_id.sh`
46+
- `get_deployment_status.sh`
47+
- `get_latest_deployment.sh`
48+
- `start_deployment.sh`
49+
- `upload_package.sh`
50+
51+
Now copy the scripts from the sample repositorys V2 folder to the corresponding folder in you repo:
52+
- If you prefer PowerShell:
53+
- All .ps1 files in `V2/powershell` should be copied to `devops/powershell`
54+
- All .yaml/.yml in `V2/powershell/azuredevops` should be copied to `devops`
55+
- If you prefer Bash:
56+
- All .sh files in `V2/bash` should be copied to `devops/scripts`
57+
- All .yaml/.yml in `V2/bash/azuredevops` should be copied to `devops`
1258

13-
## Move directly from V1 to V2 scripts
14-
This assumes you have only changes the parameters mentioned in the original guide
59+
Now we need some important values: Project id and Target environment alias.
60+
- [This section](./samplecicdpipeline/README.md#obtaining-the-project-id-and-api-key) explains how to get the project id.
61+
- [This section](./samplecicdpipeline/README.md#getting-environment-aliases-to-target) explains how to get the environment alias.
1562

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

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

19-
# github
68+
# GitHub

0 commit comments

Comments
 (0)