You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We wanted to improve on the original flow based on all the feedback received from users of the feature.
1
+
# Migrate from version 1 to version 2
3
2
4
-
Here we will go through how to migrate from V1 samples to V2 samples.
3
+
The original flow has been improved based on the feedback received from users of the feature.
4
+
5
+
This article covers how to migrate from version 1 samples to version 2.
5
6
6
7
{% hint style="info" %}
7
8
Be advised that both scripts and pipeline files have changes.
8
9
9
-
Familiarize you self with the new samples.
10
+
Familiarize yourself with the new samples.
10
11
11
-
If you customized the flow or the V1 scripts please take extra care to incorporate your changes.
12
+
If you customized the flow or the version 1 scripts, take extra care to incorporate your changes.
12
13
{% endhint %}
13
14
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.
15
+
You can keep using the old endpoints and samples, but you will miss out on the enhancements. There are currently no plans to deprecate the version 1 endpoints.
15
16
16
17
## What has changed?
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
18
20
-
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.
19
+
The biggest enhancement is the ability to target different environments. You can now target the flexible and the leftmost mainline environment.
20
+
21
+
The new endpoints are created to accommodate this enhancement, meaning you will have to supply a target environment alias in some requests.
22
+
23
+
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.
24
+
25
+
When you request a deployment, you now also need to supply an `artifactId`. More options are available when deploying.
26
+
27
+
To showcase how to use the version 2 endpoints and flow, updated samples are provided.
21
28
22
-
When you request a deployment you now also need to supply an artifactId. Also more options are available when deploying.
29
+
## Migrate Azure DevOps
23
30
24
-
To showcase how to use the new V2 endpoints and flow, we have created some updated samples.
31
+
Start by deleting the scripts and YAML files you initially got from the CI/CD samples:
25
32
26
-
# Migrate Azure DevOps
27
-
Start by deleting the scripts and yaml files you initially got from the CI/CD samples:
28
-
- Delete the Yaml/yml:
33
+
- Delete the YAML:
29
34
-`azure-release-pipeline.yaml`
30
35
-`cloud-sync.yml`
31
36
-`cloud-deployment.yml`
32
37
33
38
You probably only have either PowerShell or Bash.
39
+
34
40
- PowerShell files to delete:
35
41
-`Add-DeploymentPackage.ps1`
36
42
-`Apply-Patch.ps1`
@@ -48,31 +54,37 @@ You probably only have either PowerShell or Bash.
48
54
-`start_deployment.sh`
49
55
-`upload_package.sh`
50
56
51
-
Now copy the scripts from the sample repositorys V2 folder to the corresponding folder in you repo:
57
+
Copy the scripts from the sample repository's version 2 folder to the corresponding folder in your repo:
58
+
52
59
- 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`
60
+
- All `.ps1` files in `V2/powershell` should be copied to `devops/powershell`
61
+
- All `.yaml/.yml` files in `V2/powershell/azuredevops` should be copied to `devops`
55
62
- 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`
63
+
- All `.sh` files in `V2/bash` should be copied to `devops/scripts`
64
+
- All `.yaml/.yml` files in `V2/bash/azuredevops` should be copied to `devops`
58
65
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.
66
+
Now you need some important values: Project ID and Target environment alias.
62
67
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.
68
+
-[How to get the project id](./samplecicdpipeline/README.md#obtaining-the-project-id-and-api-key)
69
+
-[How to get the environment alias](./samplecicdpipeline/README.md#getting-environment-aliases-to-target)
65
70
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`.
71
+
Open the `azure-release-pipeline.yaml` in your favorite editor.
67
72
68
-
# Migrate GitHub
69
-
Start by deleting the scripts and yaml files you initially got from the CI/CD samples:
70
-
- Delete the Yaml:
73
+
Replace `##Your project Id here##` with the project ID and the value `##Your target environment alias here#` with the environment alias.
74
+
75
+
You can use any of the available aliases, but to get similar functionality as before, select the environment described as `Leftmost mainline`.
76
+
77
+
## Migrate GitHub
78
+
79
+
Start by deleting the scripts and YAML files you initially got from the CI/CD samples:
80
+
81
+
- Delete the YAML:
71
82
-`main.yml`
72
83
-`cloud-sync.yml`
73
84
-`cloud-deployment.yml`
74
85
75
86
You probably only have either PowerShell or Bash.
87
+
76
88
- PowerShell files to delete:
77
89
-`Add-DeploymentPackage.ps1`
78
90
-`Apply-Patch.ps1`
@@ -91,22 +103,25 @@ You probably only have either PowerShell or Bash.
91
103
-`upload_package.sh`
92
104
93
105
Now copy the scripts from the sample repositorys V2 folder to the corresponding folder in you repo:
106
+
94
107
- If you prefer PowerShell:
95
-
- All .ps1 files in `V2/powershell` should be copied to `.github/powershell`
96
-
- All .yaml/.yml in `V2/powershell/github` should be copied to `.github/workflows`
108
+
- All `.ps1` files in `V2/powershell` should be copied to `.github/powershell`
109
+
- All `.yaml/.yml` files in `V2/powershell/github` should be copied to `.github/workflows`
97
110
- If you prefer Bash:
98
-
- All .sh files in `V2/bash` should be copied to `.github/scripts`
99
-
- All .yaml/.yml in `V2/bash/github` should be copied to `.github/workflows`
111
+
- All `.sh` files in `V2/bash` should be copied to `.github/scripts`
112
+
- All `.yaml/.yml` files in `V2/bash/github` should be copied to `.github/workflows`
100
113
101
114
Now we need one important value: Target environment alias.
115
+
102
116
-[This section](./samplecicdpipeline/README.md#getting-environment-aliases-to-target) explains how to get the environment alias.
103
117
104
118
Go to your GitHub repository and enter the `Settings` section.
105
-
- In the left side menu find the `Security` section and click on `Actions`
106
-
- Click on the tab `Variables`
107
-
- Click on `New repository variable`
108
-
- Call the variable `TARGET_ENVIRONMENT_ALIAS`
109
-
- Use the environment alias as value
119
+
120
+
- On the left side menu, find the `Security` section and click on `Actions`.
121
+
- Click on the tab `Variables`.
122
+
- Click on `New repository variable`.
123
+
- Call the variable `TARGET_ENVIRONMENT_ALIAS`.
124
+
- Use the environment alias as a value.
110
125
- Click on `Add variable`.
111
126
112
-
You can use any of the available aliases, but to get similar functionality as before you should select the environment described as `Leftmost mainline`.
127
+
You can use any of the available aliases, but to get similar functionality as before, select the environment described as `Leftmost mainline`.
0 commit comments