Skip to content

Instantly share code, notes, and snippets.

@GuyHarwood
Last active July 26, 2017 15:06
Show Gist options
  • Save GuyHarwood/537a1eb59be3545df92b9deaf4d714b7 to your computer and use it in GitHub Desktop.
Save GuyHarwood/537a1eb59be3545df92b9deaf4d714b7 to your computer and use it in GitHub Desktop.

Pre-reqs for ubuntu: https://github.com/Microsoft/vsts-agent/blob/master/docs/start/envubuntu.md

Install

https://www.visualstudio.com/en-gb/docs/build/actions/agents/v2-linux

~/$ wget https://github.com/Microsoft/vsts-agent/releases/download/v2.111.1/vsts-agent-osx.10.11-x64-2.111.1.tar.gz
~/$ mkdir vstsagent && cd vstsagent
~/vstsagent$ tar zxvf ~/vsts-agent-osx.10.11-x64-2.111.1.tar.gz

Service configuration

Running config.sh currently fails with: Failed to initialize CoreCLR, HRESULT: 0x80131500

This is due to compatibility issues with the icu library v55 on 16.04. To install v52 run the following...

wget http://security.ubuntu.com/ubuntu/pool/main/i/icu/libicu52_52.1-8ubuntu0.2_amd64.deb
sudo dpkg -i libicu52_52.1-8ubuntu0.2_amd64.deb

Now you can continue with the documented steps...

run the configuration tool

~/vstsagent$ ./config.sh

You will be asked for the following...

URL: https://yourRootProject.visualstudio.com

PAT (Personal access token): can be found in your account security section

The agent should be configured to run as a service...

https://github.com/Microsoft/vsts-agent/blob/master/docs/start/svcsystemd.md

Known issues

PATH updates

If you ever update PATH this will not automatically be reflected in VSO agent metadata. The workaround is to run run the following...

# update the vso PATH metadata
~/vstsagent/env.sh 
# restart the vso agent service
~/vstsagent/svc.sh stop
~/vstsagent/svc.sh start

running phantomJS against a local node web server

The test.sh script runs node server.js & to fire up a non blocking node web server process for the app, which is then killed once the tests are complete. Running npm start & was troublesome as node is spawned as a separate process.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment