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.
How to update a system capability in a build agent in vsts?
Asked Answered
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.
Should i update it to "C:\Program Files (x86)\Java\jdk1.8.0_172" , as I need Ci to use jdk 8 ? –
Storey
@RehanHaque yes, if you
ve updated your java environment and that
s your real path on your build machine –
Asiatic same issue is happening with me, how did you solve it? –
Flong
@ShamraiAleksander what about capabilities which do not show up as env variables? –
Gruel
@ShamraiAleksander for now you can still add your own, i don't know how accurate this is (and it is a couple of years old now) but they were or are thinking about deprecating capabilities: github.com/microsoft/azure-pipelines-agent/issues/2291 –
Tetherball
I just added some new environment vars on my Win10 machine (using cmd.exe /
setx
) and have restarted the whole machine. Should I expect to see the new vars in the Capabilities screen? I do not –
Le I have not been able to trigger it to update those capabilities, specifically the JAVA_HOME variable. I tried stopping and restarting the agent as well as restarting the machine with no luck. I am running the agent interactively on MacOS Monterey. –
Karyolysis
@Karyolysis You can try to add JAVA_HOME through
Add a new capability
here: learn.microsoft.com/en-us/azure/devops/pipelines/agents/… –
Asiatic Thanks. I was gonna try that but instead, I just decided to remove and reconfigure the agent, which of course sorted it. –
Karyolysis
© 2022 - 2024 — McMap. All rights reserved.