Skip to content

Commit

Permalink
Update links from accountname.visualstudio.com to dev.azure.com/accou…
Browse files Browse the repository at this point in the history
…ntname (#773)

* Update links from accountname.visualstudio.com to dev.azure.com/accountname

* Update links from accountname.visualstudio.com to dev.azure.com/accountname

* Fix pattern property reference

* Fix pattern property reference

* line ending problems

* Hard-code dnceng
  • Loading branch information
chcosta committed Sep 19, 2018
1 parent cf0b4c0 commit 3d83b4f
Show file tree
Hide file tree
Showing 14 changed files with 46 additions and 53 deletions.
2 changes: 1 addition & 1 deletion .vsts-code-mirror.yml
Expand Up @@ -32,7 +32,7 @@ phases:
git clone https://dotnet-maestro-bot:$(BotAccount-dotnet-maestro-bot-PAT)@github.com/$(GithubRepo) $(WorkingDirectoryName) -b $(BranchToMirror)
displayName: Clone GitHub repo
- script: |
git remote add vsts-mirror https://dn-bot:$(dn-bot-dnceng-build-rw-code-rw)@dnceng.visualstudio.com/internal/_git/$(VstsRepoName)
git remote add vsts-mirror https://dn-bot:$(dn-bot-dnceng-build-rw-code-rw)@dev.azure.com/dnceng/internal/_git/$(VstsRepoName)
displayName: Add VSTS remote
workingDirectory: $(WorkingDirectoryName)
- script: |
Expand Down
2 changes: 1 addition & 1 deletion Documentation/BranchesChannelsAndSubscriptions.md
Expand Up @@ -38,7 +38,7 @@ Channels have the following characteristics:
- A build may be applied to multiple channels.
- Channels may be public or internal. This differentiates what may be done with outputs from a build. The following rules must be followed:
- Builds of internal, non public branches may **not** be assigned to public channels.
- Build assets that are assign to an internal channel may not publish/display outputs in a public location (e.g. nuget.org, dotnet.visualstudio.com/public)
- Build assets that are assign to an internal channel may not publish/display outputs in a public location (e.g. nuget.org, dev.azure.com/dnceng/public)

#### Subscriptions

Expand Down
16 changes: 8 additions & 8 deletions Documentation/Darc.md
Expand Up @@ -253,14 +253,14 @@ from the local, get the DependencyItems that match the SHA+repo combination from
{
name: "DependencyA",
version: "1.2.3-45",
repo-uri: "https://devdiv.visualstudio.com/DefaultCollection/DevDiv/_git/DotNet-CoreFX-Trusted",
repo-uri: "https://dev.azure.com/devdiv/DevDiv/_git/DotNet-CoreFX-Trusted",
sha: "13242134123412341465",
type: "product"
},
{
name: "DependencyB",
version: "2.200.0",
repo-uri: "https://devdiv.visualstudio.com/DefaultCollection/DevDiv/_git/DotNet-CoreCLR-Trusted",
repo-uri: "https://dev.azure.com/devdiv/DevDiv/_git/DotNet-CoreCLR-Trusted",
sha: "1234123412341234",
type: "toolset"
},
Expand Down Expand Up @@ -426,19 +426,19 @@ Output:
```
[
{
repo-uri: "https://devdiv.visualstudio.com/DefaultCollection/DevDiv/_git/DotNet-CoreFX-Trusted",
repo-uri: "https://dev.azure.com/devdiv/DevDiv/_git/DotNet-CoreFX-Trusted",
branch: "master",
prLink: "https://devdiv.visualstudio.com/DefaultCollection/DevDiv/Default/_git/DotNet-CoreFX-Trusted/pullrequest/88066"
prLink: "https://dev.azure.com/devdiv/DevDiv/Default/_git/DotNet-CoreFX-Trusted/pullrequest/88066"
},
{
repo-uri: "https://devdiv.visualstudio.com/DefaultCollection/DevDiv/_git/DotNet-CoreFX-Trusted",
repo-uri: "https://dev.azure.com/devdiv/DevDiv/_git/DotNet-CoreFX-Trusted",
branch: "release/2.1",
prLink: "https://devdiv.visualstudio.com/DefaultCollection/DevDiv/Default/_git/DotNet-CoreFX-Trusted/pullrequest/88067"
prLink: "https://dev.azure.com/devdiv/DevDiv/Default/_git/DotNet-CoreFX-Trusted/pullrequest/88067"
},
{
repo-uri: "https://devdiv.visualstudio.com/DefaultCollection/DevDiv/_git/DotNet-CoreFX-Trusted",
repo-uri: "https://dev.azure.com/devdiv/DevDiv/_git/DotNet-CoreFX-Trusted",
branch: "release/1.1.0",
prLink: "https://devdiv.visualstudio.com/DefaultCollection/DevDiv/Default/_git/DotNet-CoreFX-Trusted/pullrequest/88067"
prLink: "https://dev.azure.com/devdiv/DevDiv/Default/_git/DotNet-CoreFX-Trusted/pullrequest/88067"
},
...
]
Expand Down
10 changes: 5 additions & 5 deletions Documentation/NetCore21ServicingFlow.md
Expand Up @@ -27,13 +27,13 @@ Given the complexity of producing a build, it's recommended that the **Full Buil

### Build Definitions and Pipebuild Definitions

The pipebuild descriptions for the builds are held in https://devdiv.visualstudio.com/DefaultCollection/DevDiv/_git/DotNet-BuildPipeline. The definitions are comprised of an outer pipebuild definition which orchestrates inner pipebuild and utility build definitions. For example, the orchestrated pipebuild build definition launches the corefx pipebuild build definition with specific parameters, waits for it to complete, then launches the corefx pipebuild build definition.
The pipebuild descriptions for the builds are held in https://dev.azure.com/devdiv/DevDiv/_git/DotNet-BuildPipeline. The definitions are comprised of an outer pipebuild definition which orchestrates inner pipebuild and utility build definitions. For example, the orchestrated pipebuild build definition launches the corefx pipebuild build definition with specific parameters, waits for it to complete, then launches the corefx pipebuild build definition.
- **Public Servicing** - Public builds will use publicly visible intermediate storage and publish build information to the dotnet/versions repo on completion.
- **Build Definition** - https://devdiv.visualstudio.com/DevDiv/_build/index?definitionId=8287
- **Pipebuild Definition** - https://devdiv.visualstudio.com/DefaultCollection/DevDiv/Default/_git/DotNet-BuildPipeline?path=%2Fsrc%2FPipeBuild%2FPipeBuild%2Fpipelines.orchestrated-release-2.1.json&version=GBorchestrated
- **Build Definition** - https://dev.azure.com/devdiv/DevDiv/_build/index?definitionId=8287
- **Pipebuild Definition** - https://dev.azure.com/devdiv/DevDiv/Default/_git/DotNet-BuildPipeline?path=%2Fsrc%2FPipeBuild%2FPipeBuild%2Fpipelines.orchestrated-release-2.1.json&version=GBmaster
- **Internal Servicing** - Internal builds will use private intermediate storage, including private blob feeds and will not publish build information to the dotnet/versions repo on completion.
- **Build Definition** - https://devdiv.visualstudio.com/DevDiv/_build/index?definitionId=9010
- **Pipebuild Definition** - `https://devdiv.visualstudio.com/DefaultCollection/DevDiv/Default/_git/DotNet-BuildPipeline?path=%2Fsrc%2FPipeBuild%2FPipeBuild%2Fpipelines.orchestrated-release-2.1-internal.json&version=GBorchestrated
- **Build Definition** - https://dev.azure.com/devdiv/_build/index?definitionId=9010
- **Pipebuild Definition** - `https://dev.azure.com/devdiv/DevDiv/Default/_git/DotNet-BuildPipeline?path=%2Fsrc%2FPipeBuild%2FPipeBuild%2Fpipelines.orchestrated-release-2.1-internal.json&version=GBmaster

## Step-by-Step

Expand Down
10 changes: 5 additions & 5 deletions Documentation/VSTS/VSTSGuidance.md
Expand Up @@ -4,11 +4,11 @@

There are two projects for use. They are:

- public (https://dnceng.visualstudio.com/public)
- public (https://dev.azure.com/dnceng/public)
- Used for oss
- For build definitions only (no source code - that's on GitHub)
- Build definitions are allowed to pull source directly from GitHub
- internal (https://dnceng.visualstudio.com/internal)
- internal (https://dev.azure.com/dnceng/internal)
- Build definitions are only allowed to pull source from internal repos
- Public GitHub repos should be mirror here for official msft builds

Expand All @@ -24,9 +24,9 @@ In this context, teams pretty much only affect which level the kanban (or whatev

To keep things as simple (manageable) as possible, we're going to manage permissions coarsely at the project level - pointing directly to existing AD security groups managed in idweb. **We should not be managing permission outside of this method**

- Permissions will point to existing security groups in AD which are managed in idweb. This admin is done at the **project** level. ([VSTS link](https://dnceng.visualstudio.com/internal/_admin/_security))
- Permissions will point to existing security groups in AD which are managed in idweb. This admin is done at the **project** level. ([VSTS link](https://dev.azure.com/dnceng/internal/_admin/_security))
- The bulk of folks will be in the 'contributers' group, with special additions for other groups (like admin)
- There are VSTS permission groups that can be set out side of the project context. ([VSTS link](https://dnceng.visualstudio.com/_admin/_security)) **We're not going to use those**
- There are VSTS permission groups that can be set out side of the project context. ([VSTS link](https://dev.azure.com/dnceng/_admin/_security)) **We're not going to use those**
- It is also possible to set permissions at the team. **We're not going to do that**

## Casing
Expand Down Expand Up @@ -130,5 +130,5 @@ Both of these would point to the same yaml file in the forks of the repo:

From time to time, there are some terms you might encounter in documentation or otherwise. Here's some I've run across so far and the interpretation.

- collection --> account --> instance (top level thing - e.g. devdiv.visualstudio.com)
- collection --> account --> instance (top level thing - e.g. dev.azure.com/dnceng)
- team --> group of indivduals. Largely is about the backlog, not much more. In our case we're not using for permissions.
16 changes: 8 additions & 8 deletions Documentation/VSTS/VSTSOnboarding.md
Expand Up @@ -19,7 +19,7 @@

If your repository has internal builds, you will need to set up a DncEng Internal mirror. This is *required* for internal builds; if your repository only does PR or public CI builds, you can skip this step.

Instructions for setting up the GitHub to dnceng.visualstudio.com/internal mirror are available in the [dnceng.visualstudio.com internal mirror documentation](./internal-mirror.md)
Instructions for setting up the GitHub to dev.azure.com/dnceng/internal mirror are available in the [dev.azure.com/dnceng internal mirror documentation](./internal-mirror.md)

## VSTS Pull Request and CI builds

Expand Down Expand Up @@ -50,16 +50,16 @@ The [VSTS CI Build guidance](https://docs.microsoft.com/en-us/vsts/build-release
```JSON
"_links": {
"self": {
"href": "https://dnceng.visualstudio.com/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_apis/build/Definitions/15?revision=4"
"href": "https://dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_apis/build/Definitions/15?revision=4"
},
"web": {
"href": "https://dnceng.visualstudio.com/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_build/definition?definitionId=15"
"href": "https://dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_build/definition?definitionId=15"
},
"editor": {
"href": "https://dnceng.visualstudio.com/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_build/designer?id=15&_a=edit-build-definition"
"href": "https://dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_build/designer?id=15&_a=edit-build-definition"
},
"badge": {
"href": "https://dnceng.visualstudio.com/_apis/public/build/definitions/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/15/badge"
"href": "https://dev.azure.com/dnceng/_apis/public/build/definitions/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/15/badge"
}
},
```
Expand All @@ -73,12 +73,12 @@ It is recommended that you restrict the CI build status to a particular branch.
Example:

```Text
https://dnceng.visualstudio.com/Public/_build/index?definitionId=17&branchName=master
https://dev.azure.com/dnceng/public/_build/index?definitionId=17&branchName=master
```

## Signed Builds

dnceng.visualstudio.com does not have support for signed builds. Code should still be mirrored to dnceng.visualstudio.com/internal as outlined in the [VSTS Guidance](./VSTSGuidance.md#projects), but build definitions for signing should be created in devdiv.visualstudio.com, see the additional [signing documentation](https://github.com/dotnet/core-eng/blob/master/Documentation/Project-Docs/VSTS/signed-dnceng.visualstudio.com-builds.md)
dev.azure.com/dnceng now has support for signed builds. Code should be mirrored to dev.azure.com/dnceng/internal as outlined in the [VSTS Guidance](./VSTSGuidance.md#projects). See [MovingFromDevDivToDncEng.md](./MovingFromDevDivToDncEng.md) for information about moving signed builds from DevDiv to DncEng.

## Security

Expand Down Expand Up @@ -114,7 +114,7 @@ Notes about templates:

### Known issues

For a list of known VSTS issues we are tracking, please go [here](https://dnceng.visualstudio.com/internal/_queries/query/7275f17c-c42f-44b8-9798-9c2426bf8395/)
For a list of known VSTS issues we are tracking, please go [here](https://dev.azure.com/dnceng/internal/_queries/query/7275f17c-c42f-44b8-9798-9c2426bf8395/)

### Queuing builds

Expand Down
6 changes: 3 additions & 3 deletions Documentation/VSTS/internal-mirror.md
@@ -1,9 +1,9 @@
# dotnet.visualstudio.com Internal Mirror
# dev.azure.com/dnceng Internal Mirror

Public code should be mirrored to dnceng.visualstudio.com/internal (see [VSTS Guidance](https://github.com/dotnet/arcade/blob/master/Documentation/VSTS/VSTSGuidance.md)). These are the steps for setting up your GitHub repo to mirror into dnceng.visualstudio.com/internal.
Public code should be mirrored to dev.azure.com/dnceng/internal (see [VSTS Guidance](https://github.com/dotnet/arcade/blob/master/Documentation/VSTS/VSTSGuidance.md)). These are the steps for setting up your GitHub repo to mirror into dev.azure.com/dnceng/internal.

1. Add the [maestro web hook](https://github.com/dotnet/core-eng/blob/master/Documentation/Maestro/web-hooks.md)
2. Make sure you have created a repo in the dnceng.visualstudio.com/internal project that is in the format "{org}-{repo}" (replace any `/` with `-` in the GitHub repo name).
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).
- Example: github.com/dotnet/arcade => dotnet-arcade
3. Add data for repo and branches that you want mirrored to the [subscriptions json](https://github.com/dotnet/versions/blob/master/Maestro/subscriptions.json). 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-vsts-mirror"`.

Expand Down
11 changes: 2 additions & 9 deletions README.md
Expand Up @@ -6,15 +6,8 @@ Arcade is intended to provide well-understood and consistent mechanisms for cons

## Build & Test Status

VSTS [![Build Status](https://dnceng.visualstudio.com/_apis/public/build/definitions/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/17/badge
)](https://dnceng.visualstudio.com/public/_build/index?definitionId=17&branchName=master)

Jenkins

| | x64 Debug|x64 Release|
|:--:|:--:|:--:|
|**Windows_NT**|[![Build Status](https://ci.dot.net/job/dotnet_arcade/job/master/job/Windows_NT_Debug/badge/icon)](https://ci.dot.net/job/dotnet_arcade/job/master/job/Windows_NT_Debug/)|[![Build Status](https://ci.dot.net/job/dotnet_arcade/job/master/job/Windows_NT_Release/badge/icon)](https://ci.dot.net/job/dotnet_arcade/job/master/job/Windows_NT_Release/)|
|**Ubuntu 16.04**|[![Build Status](https://ci.dot.net/job/dotnet_arcade/job/master/job/Ubuntu16.04_Debug/badge/icon)](https://ci.dot.net/job/dotnet_arcade/job/master/job/Ubuntu16.04_Debug/)|[![Build Status](https://ci.dot.net/job/dotnet_arcade/job/master/job/Ubuntu16.04_Release/badge/icon)](https://ci.dot.net/job/dotnet_arcade/job/master/job/Ubuntu16.04_Release/)|
VSTS [![Build Status](https://dev.azure.com/dnceng/_apis/public/build/definitions/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/17/badge
)](https://dev.azure.com/dnceng/public/_build/index?definitionId=17&branchName=master)

## Getting Started

Expand Down
10 changes: 5 additions & 5 deletions scripts/vsts-onboard.ps1
Expand Up @@ -3,7 +3,7 @@
Performs a set of actions to enable a repo in VSTS.
.DESCRIPTION
- Makes an internal repo on dnceng.visualstudio.com for the GitHub repo
- Makes an internal repo on dev.azure.com/dnceng for the GitHub repo
- Adds a Maestro webhook
- Adds a folder structure on internal and public VSTS for build definitions
Expand Down Expand Up @@ -73,10 +73,10 @@ function Create-VSTS-Folder {
}
}

$vstsInternalInstance = "https://dnceng.visualstudio.com/internal"
$vstsPublicInstance = "https://dnceng.visualstudio.com/public"
$vstsInternalInstance = "https://dev.azure.com/dnceng/internal"
$vstsPublicInstance = "https://dev.azure.com/dnceng/public"

Write-Output "This script will create the basic set of primitives for onboarding a repo onto dnceng.visualstudio.com:"
Write-Output "This script will create the basic set of primitives for onboarding a repo onto dev.azure.com/dnceng:"
Write-Output " - An internal copy of the GitHub repo."
Write-Output " - A webhook to ensure mirror the repo."
Write-Output " - Folder structure for public and internal CI."
Expand Down Expand Up @@ -123,7 +123,7 @@ $githubOrg = $githubRepoInfo.owner.login
$githubRepo = $githubRepoInfo.name
$vstsRepo = "$githubOrg-$githubRepo"

# Check that the repo doesn't already exist on dnceng.visualstudio.com's internal instance. Unfortunately
# Check that the repo doesn't already exist on dev.azure.com/dnceng's internal instance. Unfortunately
# we can't tell the difference here between a bad PAT and a missing repo.
Write-Output "Determining whether VSTS mirror repo already exists"

Expand Down
Expand Up @@ -170,7 +170,7 @@ private BuildData MergeBuildManifests(List<BuildData> buildsMetadata)
}

/// <summary>
/// When we flow dependencies we expect source and target repos to be the same i.e github.com or dnceng.visualstudio.com. When this task is executed
/// When we flow dependencies we expect source and target repos to be the same i.e github.com or dev.azure.com/dnceng. When this task is executed
/// the repository is a VSTS repository even though the real source is GitHub since we just mirror the code.
/// When we detect a vsts repository we check if the latest commit exist in GitHub to determine if the source is GitHub or not. If the commit exists in
/// the repo we transform the Url from VSTS to GitHub. If not we continue to work with the original Url.
Expand Down
4 changes: 2 additions & 2 deletions src/Microsoft.DotNet.Arcade.Sdk/tools/RepositoryInfo.targets
Expand Up @@ -19,7 +19,7 @@

<!-- The convention for names of VSTS repositories mirrored from GitHub is "{GitHub org name}-{GitHub repository name}" -->
<PropertyGroup>
<_Pattern>https://dnceng.visualstudio.com/internal/_git/([^/-]+)-(.+)</_Pattern>
<_Pattern>https://dnceng.visualstudio\.com/internal/_git/([^/-]+)-(.+)|https://dev.azure.com/dnceng/internal/_git/([^/-]+)-(.+)</_Pattern>
<_Replacement>https://github.com/$1/$2</_Replacement>
</PropertyGroup>

Expand All @@ -34,4 +34,4 @@
</ItemGroup>
</Target>

</Project>
</Project>
Expand Up @@ -11,7 +11,7 @@
is not a VSIX project and sets $CreateVSIXContainer=false these targets should be
a no-op. However they dont check for that and that's a bug. To workaround, we override them
with empty targets and conditionally import these if CreateVSIXContainer is false.
Tracked by https://devdiv.visualstudio.com/DevDiv/_workitems?id=365685&fullScreen=false&_a=edit -->
Tracked by https://dev.azure.com/devdiv/DevDiv/_workitems?id=365685&fullScreen=false&_a=edit -->
<Target Name="VSIXIdentifierProjectOutputGroup" />
<Target Name="VSIXNameProjectOutputGroup" />

Expand Down
2 changes: 1 addition & 1 deletion src/Microsoft.DotNet.Arcade.Sdk/tools/VisualStudio.targets
Expand Up @@ -217,7 +217,7 @@
If the Project is not a VSIX project and sets $CreateVSIXContainer=false these targets should be
a no-op. However they dont check for that and that's a bug. To workaround, we override them
with empty targets and conditionally import these if CreateVSIXContainer is false.
Tracked by https://devdiv.visualstudio.com/DevDiv/_workitems?id=365685&fullScreen=false&_a=edit
Tracked by https://dev.azure.com/devdiv/DevDiv/_workitems?id=365685&fullScreen=false&_a=edit
-->
<Import Project="VisualStudio.DesignTimeBuild.targets" Condition="'$(CreateVsixContainer)' != 'true'"/>

Expand Down
6 changes: 3 additions & 3 deletions src/Microsoft.DotNet.Darc/src/DarcLib/VstsClient.cs
Expand Up @@ -522,7 +522,7 @@ private string SetApiUriAndGetRepoName(string repoUri)
}
else
{
throw new ArgumentException($"Repository URI host name '{hostName}' should be of the form <accountname>.visualstudio.com i.e. https://<accountname>.visualstudio.com");
throw new ArgumentException($"Repository URI host name '{hostName}' should be of the form dev.azure.com/<accountname> i.e. https://dev.azure.com/<accountname>");
}

string absolutePath = uri.AbsolutePath;
Expand All @@ -538,8 +538,8 @@ private string SetApiUriAndGetRepoName(string repoUri)
throw new ArgumentException($"Repository URI host name '{absolutePath}' should have a project and repo name. i.e. /DefaultCollection/<projectname>/_git/<reponame>");
}

VstsApiUri = $"https://{accountName}.visualstudio.com/{projectName}/_apis/git/";
VstsPrUri = $"https://{accountName}.visualstudio.com/{projectName}/_git/{repoName}/pullrequest/";
VstsApiUri = $"https://dev.azure.com/{accountName}/{projectName}/_apis/git/";
VstsPrUri = $"https://dev.azure.com/{accountName}/{projectName}/_git/{repoName}/pullrequest/";

return repoName;
}
Expand Down

0 comments on commit 3d83b4f

Please sign in to comment.