Skip to content

ups216/vsts-agent

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

VSTS Cross Platform Agent (CoreCLR)

Overview

A cross platform build and release agent for Visual Studio Team Services and Team Foundation Server 2015 and beyond. This will be replacing/combining the existing closed source windows build agent and the existing xplat agent

Supported on Windows, OSX and Linux. Written for the .NET Core CLR as one code base in C#.

Will run all existing tasks (typescript/javascript and powershell) including our in the box and your custom tasks written with our vsts task SDK.

Status

A preview is available for Linux/OSX for VSTS. A release is coming soon with more capabilities than the deprecated node agent: Auto Update, Cancellation, Run as a svc on OSX and Linux, and Gated support.

What's missing from the preview? Run as svc on OSX, TfsVC support, RM, test publishing (all being worked on). On-prem NTLM support is in the works so preview with VSTS.

A preview for windows is coming soon (finishing powershell handlers and tfsvc support)

Build & Test Preview Release
Linux Ubuntu 14.04 Build & Test v0.7 Soon
Apple OSX 10.11 Build & Test v0.7 Soon
Win Windows 10 Build & Test Soon

Configure Account

VSTS only for now. On-prem coming with NTLM support in the works.

Create a PAT token. Step by Step here

Add the user you created the PAT token for to both:

  1. Agent Pool Administrators (allows to register)
  2. Agent Pool Service Accounts (allows listening to build queue)

Agent Roles

TIPS: You can add to roles for a specific pool or select "All Pools" on the left and grant for all pools. This allows the account owner to delegate build administration globally or for specific pools. More here The PAT token is only used to listen to the message queue for a build job When a build is run, it will generate an OAuth token for the scoped identity selected on the general tab of the build definition. That token is short lived and will be used to access resource in VSTS

Get Agent

Step 1: Download from Releases

Download the appropriate agent from github releases

From the cmdline:

~/Downloads$ curl -kSLO https://github.com/Microsoft/vsts-agent/releases/download/v0.7/vsts-agent-linux-1.999.0-0405.tar.gz

Step 2: Create the agent

~/$ mkdir myagent && cd myagent
~/myagent$ tar zxvf ~/Downloads/vsts-agent-darwin-1.999.0-0405.tar.gz

Step 3: Run the agent

~/myagent$ ./run.sh

That's It! Your agent is running interactively and ready for builds

Configuration

Other detailed configuration options are covered here

Contribute (Dev)

Dev Dependencies

Win*nix Install .NET Core Required for our Build

Win Git for Windows Install Here _(needed for dev sh script)

Build, Test, Clean, Restore

From src:

Win dev {command}

*nix ./dev.sh {command}

Commands:

restore (r): Run first time and any time you change a project.json

build (b): build everything

test (t): run unit tests

results in: Test/bin/Debug/dnxcore50/{platform}/testResults.xml

buildtest (bt): build and test

clean (c): deletes build output for each projects

layout (l): Creates a full layout in {root}/_layout
Does a clean, restore, build, publish and copy Default is Debug. Passing Release as argument is supported (dev l Release)

update (u) {dirname}: Builds and publishes just one dir. Patches the layout update {dirname} Use if you change code in an assembly and don't want to wait for the full layout.

validate (v): Precheckin validation. Runs git clean, layout and test.

Editors

Using Visual Studio 2015
Using Visual Studio Code and Mono Debugger

Styling

We use the dotnet foundation and CoreCLR style guidelines located here

About

Visual Studio Team Services Build and Release Agent

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C# 98.3%
  • Shell 1.2%
  • Other 0.5%