Installing Octo as a Capability

Last updated

There are times when you may want to install Octo on a build agent, such as to avoid downloads, opening any firewalls and or changing proxy rules. There are a few ways in which this can be achieved. In every option presented here, you must install Octo so that it's in your current environment path. It should also be noted that the same steps can be used to register capabilities such as DotNetCore as well.

Installing Octo as a global tool will require an additional shell execution script to be in the path to delegate execution to dotnet octo. The reason for this is that the global tool install is only available via dotnet octo and doesn't
provide a way to execute Octo directly.

Agent Capability Scanning

Usually VSTS agents scan for associated capabilities, but won't pick anything up from the PATH automatically. In order for a capability to be detected, you must also add an environment variable named Octo with the associated version.

Octo System Variable

Once Octo is in the path and the above system variable is specified, VSTS will detect the capability automatically.

[Environment]::SetEnvironmentVariable("Octo", "4.39.3", "Machine")

You must restart the build agent service if making these changes while it is currently running.

Specify the Capability Manually

If you know that a build agent has Octo available on the path then you can also specify the capability manually using the VSTS/TFS web interface. Although this may be rather simple, the capability would have to be specified for each agent individually which can be quite cumbersome.

Octo specify capability

Images and Automation

Microsoft provide a number of starting points to create your own build agent images which can be modified to include Octo as an added capability. This includes packer images as well as the docker images.