Skip to content

Commit

Permalink
Configration Builder (#2327)
Browse files Browse the repository at this point in the history
Starting work on the configuration builder. Run `devopsmigration
builder` to have a different view of `init`!
  • Loading branch information
MrHinsh authored Sep 4, 2024
2 parents b861907 + 570c069 commit 2890b75
Show file tree
Hide file tree
Showing 67 changed files with 2,014 additions and 1,140 deletions.
76 changes: 74 additions & 2 deletions appsettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,34 @@
},
"MigrationTools": {
"EndpointDefaults": {
"TfsEndpoint": {
"EndpointType": "TfsTeamProjectEndpoint",
"Collection": "",
"Project": "",
"AllowCrossProjectLinking": false,
"Authentication": {
"AuthenticationMode": "AccessToken",
"AccessToken": "",
"NetworkCredentials": {
"UserName": "",
"Password": "",
"Domain": ""
}
},
"AuthenticationMode": "AccessToken",
"LanguageMaps": {
"AreaPath": "Area",
"IterationPath": "Iteration"
}
},
"TfsTeamProjectEndpoint": {
"EndpointType": "TfsTeamProjectEndpoint",
"Collection": "",
"Project": "",
"AllowCrossProjectLinking": false,
"Authentication": {
"AuthenticationMode": "AccessToken",
"AccessToken": "12345",
"AccessToken": "",
"NetworkCredentials": {
"UserName": "",
"Password": "",
Expand Down Expand Up @@ -53,13 +73,32 @@
"AreaPath": "Area",
"IterationPath": "Iteration"
}
},
"TfsEndpoint": {
"EndpointType": "TfsTeamProjectEndpoint",
"Collection": "https://dev.azure.com/nkdagility-preview/",
"Project": "migrationSource1",
"AllowCrossProjectLinking": false,
"Authentication": {
"AuthenticationMode": "AccessToken",
"AccessToken": "jklsadhjksahfkjsdhjksahsadjhksadhsad",
"NetworkCredentials": {
"UserName": "",
"Password": "",
"Domain": ""
}
},
"LanguageMaps": {
"AreaPath": "Area",
"IterationPath": "Iteration"
}
}
},
"CommonTools": {
"FieldMappingTool": {
"Enabled": false,
"FieldMaps": [],
"FieldMapDefaults" : {
"FieldMapDefaults": {
"ApplyTo": [ "*" ]
}
},
Expand Down Expand Up @@ -428,6 +467,39 @@
"SourceName": "Source",
"TargetName": "Target"
}
},
"Infrastructure": {
"ClassNameChangeMappings": {
"WorkItemMigration": "TfsWorkItemMigrationProcessor",
"WorkItemMigrationContext": "TfsWorkItemMigrationProcessor",
"TfsTeamProjectConfig": "TfsTeamProjectEndpoint",
"WorkItemGitRepoMappingTool": "TfsGitRepositoryTool",
"WorkItemFieldMappingTool": "FieldMappingTool",
"CreateTeamFolders": "TfsCreateTeamFoldersProcessor",
"ExportProfilePicture": "TfsExportProfilePictureFromADProcessor",
"ExportProfilePictureFromAD": "TfsExportProfilePictureFromADProcessor",
"ImportProfilePicture": "TfsImportProfilePictureProcessor",
"ImportProfilePictureFromAD": "TfsImportProfilePictureProcessor",
"ExportUsersForMapping": "TfsExportUsersForMappingProcessor",
"ExportUsersForMappingContext": "TfsExportUsersForMappingProcessor",
"ExportTeamListProcessor": "TfsExportTeamListProcessor",
"ExportTeamList": "TfsExportTeamListProcessor",
"ExportUsersForMappingProcessor": "TfsExportUsersForMappingProcessor",
"TestConfigurationsMigrationProcessor": "TfsTestConfigurationsMigrationProcessor",
"TestConfigurationsMigrationContext": "TfsTestConfigurationsMigrationProcessor",
"TestPlansAndSuitesMigrationProcessor": "TfsTestPlansAndSuitesMigrationProcessor",
"TestPlansAndSuitesMigrationContext": "TfsTestPlansAndSuitesMigrationProcessor",
"TestVariablesMigrationProcessor": "TfsTestVariablesMigrationProcessor",
"TestVariablesMigrationContext": "TfsTestVariablesMigrationProcessor",
"WorkItemBulkEditProcessor": "TfsWorkItemBulkEditProcessor",
"WorkItemUpdate": "TfsWorkItemBulkEditProcessor",
"WorkItemDelete": "TfsWorkItemDeleteProcessor",
"WorkItemDeleteProcessor": "TfsWorkItemDeleteProcessor",
"WorkItemPostProcessingContext": "TfsWorkItemOverwriteProcessor",
"WorkItemPostProcessingProcessor": "TfsWorkItemOverwriteProcessor",
"WorkItemUpdateAreasAsTagsContext": "TfsWorkItemOverwriteProcessor",
"WorkItemUpdateAreasAsTagsProcessor": "TfsWorkItemOverwriteProcessor"
}
}
}
}
4 changes: 2 additions & 2 deletions configuration-classic.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"$type": "TfsTeamProjectEndpointOptions",
"Collection": "https://dev.azure.com/nkdagility-preview/",
"Project": "migrationSource1",
"ReflectedWorkItemIDFieldName": "Custom.ReflectedWorkItemId",
"ReflectedWorkItemIdField": "Custom.ReflectedWorkItemId",
"AllowCrossProjectLinking": false,
"AuthenticationMode": "AccessToken",
"PersonalAccessToken": "",
Expand All @@ -19,7 +19,7 @@
"$type": "TfsTeamProjectEndpointOptions",
"Collection": "https://dev.azure.com/nkdagility-preview/",
"Project": "migrationTest5",
"ReflectedWorkItemIDFieldName": "nkdScrum.ReflectedWorkItemId",
"ReflectedWorkItemIdField": "nkdScrum.ReflectedWorkItemId",
"AllowCrossProjectLinking": false,
"AuthenticationMode": "AccessToken",
"PersonalAccessToken": "",
Expand Down
4 changes: 2 additions & 2 deletions configuration-classic2.json
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@
"$type": "TfsTeamProjectConfig",
"Collection": "https://dev.azure.com/nkdagility-preview/",
"Project": "migrationSource1",
"ReflectedWorkItemIDFieldName": "Custom.ReflectedWorkItemId",
"ReflectedWorkItemIdField": "Custom.ReflectedWorkItemId",
"AuthenticationMode": "Prompt",
"AllowCrossProjectLinking": false,
"PersonalAccessToken": "qosss7crwz3vie4fupzpaafjndoy6g6ulgkzhoxtmjgicv2lqjyq",
Expand All @@ -163,7 +163,7 @@
"$type": "TfsTeamProjectConfig",
"Collection": "https://dev.azure.com/nkdagility-preview/",
"Project": "migrationTarget1",
"ReflectedWorkItemIDFieldName": "nkdScrum.ReflectedWorkItemId",
"ReflectedWorkItemIdField": "nkdScrum.ReflectedWorkItemId",
"AuthenticationMode": "Prompt",
"AllowCrossProjectLinking": false,
"PersonalAccessToken": "qosss7crwz3vie4fupzpaafjndoy6g6ulgkzhoxtmjgicv2lqjyq",
Expand Down
8 changes: 4 additions & 4 deletions configuration.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"Serilog": {
"MinimumLevel": "Debug"
"MinimumLevel": "Information"
},
"MigrationTools": {
"Version": "16.0",
Expand All @@ -10,7 +10,7 @@
"Collection": "https://dev.azure.com/nkdagility-preview/",
"Project": "migrationSource1",
"AllowCrossProjectLinking": false,
"ReflectedWorkItemIDFieldName": "Custom.ReflectedWorkItemId",
"ReflectedWorkItemIdField": "Custom.ReflectedWorkItemId",
"Authentication": {
"AuthenticationMode": "AccessToken",
"AccessToken": "",
Expand Down Expand Up @@ -39,7 +39,7 @@
"Domain": ""
}
},
"ReflectedWorkItemIDFieldName": "nkdScrum.ReflectedWorkItemId",
"ReflectedWorkItemIdField": "nkdScrum.ReflectedWorkItemId",
"AllowCrossProjectLinking": false,
"LanguageMaps": {
"AreaPath": "Area",
Expand Down Expand Up @@ -96,7 +96,7 @@
}
]
},
"GitRepoMappingTool": {
"TfsGitRepositoryTool": {
"Enabled": true,
"Mappings": {
"Source Repo Name": "Target Repo Name"
Expand Down
20 changes: 10 additions & 10 deletions docs/Reference/Generated/MigrationTools.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions docs/Reference/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ The global configuration created by the `init` command look something like this:
"Domain": ""
}
},
"ReflectedWorkItemIDFieldName": "nkdScrum.ReflectedWorkItemId",
"ReflectedWorkItemIdField": "nkdScrum.ReflectedWorkItemId",
"AllowCrossProjectLinking": false,
"LanguageMaps": {
"AreaPath": "Area",
Expand Down Expand Up @@ -227,7 +227,7 @@ Both the `Source` and `Target` entries hold the collection URL and the Team Proj

For multi Language support you can add the name used in the source and target for both 'Area' and 'Iteration'. This allows a migration from one language version of TFS / Azure DevOps to another.

#### ReflectedWorkItemIDFieldName
#### ReflectedWorkItemIdField

This is the field that will be used to store the state for the migration . See [Server Configuration](server-configuration.md)

Expand Down
96 changes: 81 additions & 15 deletions docs/_data/reference.endpoints.tfsendpoint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,89 @@ optionsClassFullName: MigrationTools.Endpoints.TfsEndpointOptions
configurationSamples:
- name: defaults
description:
code: There are no defaults! Check the sample for options!
code: >-
{
"MigrationTools": {
"Endpoints": {
"#KEY#": {
"TfsEndpoint": {
"AllowCrossProjectLinking": "False",
"Authentication": {
"AccessToken": "12345",
"AuthenticationMode": "AccessToken",
"NetworkCredentials": {
"Domain": "",
"Password": "",
"UserName": ""
}
},
"AuthenticationMode": "AccessToken",
"Collection": "",
"EndpointType": "TfsTeamProjectEndpoint",
"LanguageMaps": {
"AreaPath": "Area",
"IterationPath": "Iteration"
},
"Project": ""
}
}
}
}
}
sampleFor: MigrationTools.Endpoints.TfsEndpointOptions
- name: sample
description:
code: There is no sample, but you can check the classic below for a general feel.
code: >-
{
"MigrationTools": {
"Endpoints": {
"#KEY#": {
"TfsEndpoint": {
"AllowCrossProjectLinking": "False",
"Authentication": {
"AccessToken": "jklsadhjksahfkjsdhjksahsadjhksadhsad",
"AuthenticationMode": "AccessToken",
"NetworkCredentials": {
"Domain": "",
"Password": "",
"UserName": ""
}
},
"Collection": "https://dev.azure.com/nkdagility-preview/",
"EndpointType": "TfsTeamProjectEndpoint",
"LanguageMaps": {
"AreaPath": "Area",
"IterationPath": "Iteration"
},
"Project": "migrationSource1"
}
}
}
}
}
sampleFor: MigrationTools.Endpoints.TfsEndpointOptions
- name: classic
description:
code: >-
{
"$type": "TfsEndpointOptions",
"Organisation": null,
"Project": null,
"AuthenticationMode": "AccessToken",
"AccessToken": null,
"Collection": "https://dev.azure.com/nkdagility-preview/",
"Project": "migrationSource1",
"Authentication": {
"AuthenticationMode": "AccessToken",
"NetworkCredentials": {
"Domain": "",
"UserName": "",
"Password": ""
},
"AccessToken": "jklsadhjksahfkjsdhjksahsadjhksadhsad"
},
"ReflectedWorkItemIdField": null,
"LanguageMaps": null,
"AllowCrossProjectLinking": false,
"LanguageMaps": {
"AreaPath": "Area",
"IterationPath": "Iteration"
},
"EndpointEnrichers": null
}
sampleFor: MigrationTools.Endpoints.TfsEndpointOptions
Expand All @@ -28,12 +94,16 @@ className: TfsEndpoint
typeName: Endpoints
architecture:
options:
- parameterName: AccessToken
type: String
- parameterName: AllowCrossProjectLinking
type: Boolean
description: missng XML code comments
defaultValue: missng XML code comments
- parameterName: Authentication
type: TfsAuthenticationOptions
description: missng XML code comments
defaultValue: missng XML code comments
- parameterName: AuthenticationMode
type: AuthenticationMode
- parameterName: Collection
type: Uri
description: missng XML code comments
defaultValue: missng XML code comments
- parameterName: EndpointEnrichers
Expand All @@ -44,10 +114,6 @@ options:
type: TfsLanguageMapOptions
description: missng XML code comments
defaultValue: missng XML code comments
- parameterName: Organisation
type: String
description: missng XML code comments
defaultValue: missng XML code comments
- parameterName: Project
type: String
description: missng XML code comments
Expand Down
Loading

0 comments on commit 2890b75

Please sign in to comment.