Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to update a system capability in a build agent in vsts?

I want to upgrade 'java_home' capability in my build agent to jdk8 as this is required to integrate 'Sonarqube Analysis' in my CI build . How can I update the same in vsts ?
I would like to either change the path for java_home (but that seems uneditable in vsts) to one with jdk8 or upgrade the java under current folder only. vsts agent

like image 581
Raq Avatar asked Jun 24 '19 10:06

Raq


People also ask

How do I update my build agent?

Right-click on the agent pool that you want to update. Choose Update All Agents from the context menu.

Can we deploy multiple build agents on one machine?

Yes you can run multiple agents in a single VM. Make two directories say Agent1 and Agent2, extract the agent in each one of them and configure them with different names against your VSTS/TFS account. It should work out of the box.


1 Answers

I think, you should update JAVA_HOME environment variable on your CI build machine and restart your build agent. Capabilities will be updated automatically: https://learn.microsoft.com/en-us/azure/devops/pipelines/agents/agents?view=azure-devops#capabilities

The agent software automatically determines various system capabilities such as the name of the machine, type of operating system, and versions of certain software installed on the machine. Also, environment variables defined in the machine automatically appear in the list of system capabilities.

like image 173
Shamrai Aleksander Avatar answered Nov 13 '22 07:11

Shamrai Aleksander