VSTS moves to Azure DevOps

on Monday, November 26, 2018

A few weeks ago Microsoft announced rebranding Visual Studio Team Services (VSTS) as Azure Dev Ops. One of the things that will be coming down the pike is a rebranding of the dns host name for VSTS.

Org URL setting

The change will take an organization url from https://{org}.visualstudio.com/ to https://dev.azure.com/{org}.

It’s not a big switch, but one that you need to plan for. We’re looking to do these things:

  • Update Firewall Rules
  • Update Build Agents
  • Update Your Visual Studio Source Control Settings
    • This is really simple and straight forward
  • Update Your Team Projects to use the new source control address (TFSVC)
    • We’re not yet on git, so this is one for the slow pokes

Here is a script to help find all your .sln files and update them to the new address.

$organizationName = "{your vsts org name}"
$rootDirectoryForSourceControlProjectsOnDisk = "C:\Root\Source-Code\Workspace\Path"
$slns = dir -Path $everything -Filter "*.sln" -Recurse -File
$changedSlns = @()
foreach($sln in $slns) {
$fullname = $sln.FullName
$c = Get-Content -Path $fullname
$updated = @()
$changed = $false
foreach($line in $c) {
if($line -match "SccTeamFoundationServer") {
if($line -match "https:\/\/$($organizationName).visualstudio.com\/") {
Write-Host "Matched: $fullname"
Write-Host "Found: $line"
$line = $line -replace "https:\/\/$($organizationName).visualstudio.com\/", "https://dev.azure.com/$($organizationName)"
$changed = $true
Write-Host "Replaced: $line"
}
}
$updated += @($line)
}
if($changed) {
Write-Host "Updating: $fullname"
$updated | Set-Content -Path $fullname
$changedSlns += @($fullname)
}
}
Write-Host "Count: $($changedSlns.Count)"

0 comments:

Post a Comment


Creative Commons License
This site uses Alex Gorbatchev's SyntaxHighlighter, and hosted by herdingcode.com's Jon Galloway.