forked from Azure/azure-devops-cli-extension
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path_help.py
More file actions
120 lines (106 loc) · 5.4 KB
/
Copy path_help.py
File metadata and controls
120 lines (106 loc) · 5.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------------------------------
from knack.help_files import helps
def load_migration_help():
helps['devops migrations'] = """
type: group
short-summary: Manage enterprise live migrations.
long-summary: 'This command group is a part of the azure-devops extension and is in preview. Availability may be limited (for example, to 1P/allowlisted users). For ELM migrations, --org should be your Azure DevOps organization URL (for example: https://dev.azure.com/myorg).'
"""
helps['devops migrations list'] = """
type: command
short-summary: List migrations in an organization.
examples:
- name: List migrations.
text: |
az devops migrations list --org https://dev.azure.com/myorg
- name: List all migrations including inactive ones.
text: |
az devops migrations list --org https://dev.azure.com/myorg --include-inactive
"""
helps['devops migrations status'] = """
type: command
short-summary: Get migration status for a repository.
examples:
- name: Get migration status by repository id.
text: |
az devops migrations status --org https://dev.azure.com/myorg --repository-id 00000000-0000-0000-0000-000000000000
"""
helps['devops migrations create'] = """
type: command
short-summary: Create a migration for a repository.
long-summary: 'If --github-token is not provided, the CLI checks ELM_GITHUB_TOKEN and then runs GitHub device flow to acquire a token.'
examples:
- name: Create a migration.
text: |
az devops migrations create --org https://dev.azure.com/myorg --repository-id 00000000-0000-0000-0000-000000000000 --target-repository https://github.com/OrgName/RepoName --agent-pool <your-agent-pool>
- name: Create a validate-only migration.
text: |
az devops migrations create --org https://dev.azure.com/myorg --repository-id 00000000-0000-0000-0000-000000000000 --target-repository https://github.com/OrgName/RepoName --agent-pool <your-agent-pool> --validate-only --skip-validation ActivePullRequestCount,PullRequestDeltaSize
- name: Create using a pre-generated GitHub token or PAT.
text: |
az devops migrations create --org https://dev.azure.com/myorg --repository-id 00000000-0000-0000-0000-000000000000 --target-repository https://github.com/OrgName/RepoName --github-token <token>
"""
helps['devops migrations pause'] = """
type: command
short-summary: Pause an active migration.
"""
helps['devops migrations resume'] = """
type: command
short-summary: Resume a stopped (paused, failed) migration.
examples:
- name: Resume using the current mode.
text: |
az devops migrations resume --org https://dev.azure.com/myorg --repository-id 00000000-0000-0000-0000-000000000000
- name: Resume in validate-only mode.
text: |
az devops migrations resume --org https://dev.azure.com/myorg --repository-id 00000000-0000-0000-0000-000000000000 --validate-only
- name: Continue migration (clears validate-only mode).
text: |
az devops migrations resume --org https://dev.azure.com/myorg --repository-id 00000000-0000-0000-0000-000000000000 --migration
"""
helps['devops migrations abandon'] = """
type: command
short-summary: Abandon and delete a migration.
examples:
- name: Abandon and keep repository read-only (default).
text: |
az devops migrations abandon --org https://dev.azure.com/myorg --repository-id 00000000-0000-0000-0000-000000000000
- name: Abandon and set repository back to read-write.
text: |
az devops migrations abandon --org https://dev.azure.com/myorg --repository-id 00000000-0000-0000-0000-000000000000 --remove-read-only
"""
helps['devops migrations cutover'] = """
type: group
short-summary: Manage migration cutover.
"""
helps['devops migrations cutover review'] = """
type: command
short-summary: Review unprocessed migration items before cutover.
examples:
- name: Review failures before approving cutover.
text: |
az devops migrations cutover review --org https://dev.azure.com/myorg --repository-id 00000000-0000-0000-0000-000000000000
"""
helps['devops migrations cutover approve'] = """
type: command
short-summary: Approve cutover by accepting a count of unprocessed items.
examples:
- name: Approve cutover after reviewing failures.
text: |
az devops migrations cutover approve --org https://dev.azure.com/myorg --repository-id 00000000-0000-0000-0000-000000000000 --accept-failures 3
"""
helps['devops migrations cutover set'] = """
type: command
short-summary: Schedule cutover for a migration.
examples:
- name: Schedule cutover.
text: |
az devops migrations cutover set --org https://dev.azure.com/myorg --repository-id 00000000-0000-0000-0000-000000000000 --date 2030-12-31T11:59:00Z
"""
helps['devops migrations cutover cancel'] = """
type: command
short-summary: Cancel a scheduled cutover.
"""