Skip to content

Commit

Permalink
Update internal mirror instructions (#14906)
Browse files Browse the repository at this point in the history
Co-authored-by: Matt Mitchell <mmitche@microsoft.com>
  • Loading branch information
sebastienros and mmitche committed Jun 27, 2024
1 parent ede13bd commit be1b644
Showing 1 changed file with 25 additions and 17 deletions.
42 changes: 25 additions & 17 deletions Documentation/AzureDevOps/internal-mirror.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,33 @@
# dev.azure.com/dnceng Internal Mirror
# Mirroring GitHub to dev.azure.com/dnceng and dev.azure.com/devdiv

Public code should be mirrored to dev.azure.com/dnceng/internal (see [Azure DevOps Guidance](https://github.com/dotnet/arcade/blob/master/Documentation/AzureDevOps/AzureDevOpsGuidance.md)). These are the steps for setting up your GitHub repo to mirror into dev.azure.com/dnceng/internal.
Public code should be mirrored to dev.azure.com/dnceng/internal or dev.azure.com/dnceng/devdiv, depending on where your pipelines live. (see [Azure DevOps Guidance](https://github.com/dotnet/arcade/blob/master/Documentation/AzureDevOps/AzureDevOpsGuidance.md)). These are the steps for setting up your GitHub repo for mirroring.

1. Add the [maestro web hook](https://github.com/dotnet/arcade/blob/main/Documentation/Maestro/web-hooks.md)
2. Make sure you have created a repo in the dev.azure.com/dnceng/internal project that is in the format "{org}-{repo}" (replace any `/` with `-` in the GitHub repo name).
1. Make sure you have a repo in the dev.azure.com/dnceng/internal project with a name in the format "{org}-{repo}" (replace any `/` with `-` in the GitHub repo name). Please follow up with dnceng if a repository does not exist. For DevDiv repos, the pattern is {org}-{repo}-Trusted.
- Example: github.com/dotnet/arcade => dotnet-arcade
3. Create a PR to the dotnet/versions repo which adds data for repo and branches that you want mirrored to the [subscriptions json](https://github.com/dotnet/versions/blob/master/Maestro/subscriptions.json) file. Specifically, add a URI of the pattern `"https://github.com/{org}/{repo}/blob/{branch}/**/*"` for your GitHub repository to the `triggerPaths` list above `"action": "github-dnceng-azdo-mirror"`. Please alphabetize.
2. Create a PR to the `dotnet-mirroring` internal repo which adds data for repo and branches that you want mirrored, to the [dnceng subscriptions json](https://dev.azure.com/dnceng/internal/_git/dotnet-mirroring?path=/dnceng-subscriptions.jsonc) or [devdiv subscriptions json](https://dev.azure.com/dnceng/internal/_git/dotnet-mirroring?path=/devdiv-subscriptions.jsonc) files. Specifically, add a URI for your GitHub repository to the `repos` object, then types of mirroring and regex branch patterns. Please alphabetize.

```
"https://github.com/dotnet/project-system/blob/release/**/*",
"https://github.com/dotnet/toolset/blob/master/**/*",
"https://github.com/dotnet/toolset/blob/release/**/*",
"https://github.com/dotnet/roslyn/blob/master/**/*",
"https://github.com/dotnet/roslyn/blob/release/**/*",
"https://github.com/{org}/{repo}/blob/{branch}/**/*" // <-- insert your URI here, in alpha order.
"https://github.com/microsoft/msbuild/blob/master/**/*",
"https://github.com/microsoft/msbuild/blob/release/**/*",
Example:
```json
"https://github.com/dotnet/source-indexer": {
"fastForward": [
"main"
]
},
"https://github.com/dotnet/sourcelink": {
"fastForward": [
"main", // Fast forward main -> main
"release/.*"
]
},
"https://github.com/dotnet/spa-templates": {
"fastForward": [
// GitHubBranchNotFound "main",
"release/.*"
],
"action": "github-dnceng-azdo-mirror",
"actionArguments": {
"vsoSourceBranch": "master",
"internalMerge": [
"release/.*" // Merge release/.* -> internal/release/.*
]
},
```


Expand Down

0 comments on commit be1b644

Please sign in to comment.