VSTS - Visual Studio Team Services

Setting up a new instance of VSTS

  • Account level settings
    • Region - Australia East
    • Timezone - GMT+10
    • Users (adding Frank)
    • Agent pools (adding 3 hosted VSTS agents)
    • Security (adding to Frank to Project Collection Administrators)
    • Billing (for adding VSTS agents which does the actual work)
    • Active Directory (created automatically)
  • Project level settings
    • Adding a Azure ARM service endpoint (for Azure relation interactions)
    • Adding a source code repository service endpoint (for Bitbucket)
      • Add a depth of 3 for faster checkout
    • Project level variable sets
  • Build level settings
    • Use Bitbucket Service endpoint for "Get sources" process
    • Triggers (on repo change?)
    • Linking Project level variable groups to build definition
    • Batch builds? "Batch changes while a build is in progress"
    • Testing extensions?
  • Release level settings
    • Artefact retrieval conditions/triggers
    • Pre-deployment conditions/triggers

Things to think about

  • Build format? $(date:yyyyMMdd)$(rev:.r) ? or something else?
  • Test plans? Machines?
  • Retention?
  • How to export release level settings? as json?
  • Build numbers in hosting location
  • Moving things over from Build to Release def to enable parallel execution of agents

Random

Dumping all environment variables (Reference - Codewrecks )

$var = (gci env:*).GetEnumerator() | Sort-Object Name
$out = ""
Foreach ($v in $var) {$out = $out + "`t{0,-28} = {1,-28}`n" -f $v.Name, $v.Value}
 
write-output "dump variables on $env:BUILD_ARTIFACTSTAGINGDIRECTORY\test.md"
$fileName = "$env:BUILD_ARTIFACTSTAGINGDIRECTORY\test.md"
set-content $fileName $out
 
write-output "##vso[task.addattachment type=Distributedtask.Core.Summary;name=Environment Variables;]$fileName"

VSTS - Multi phase builds coming soon (Developing as at Sept 2017)
VSTS Extension - Variable Toolbox (for concatenating build variables)