Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to upgrade build agent to support Java 8

I want to use Java 8 in an application, but this version of Java is not installed on the TeamCity build agent I'm using. What is the proper procedure of upgrading Java to the latest version on the agent without breaking the builds of other projects which are still running on Java 7?

like image 631
JohnEye Avatar asked Sep 03 '14 13:09

JohnEye


People also ask

Does Jenkins support Java 8?

The next Jenkins LTSLTSLong-term support (LTS) is a product lifecycle management policy in which a stable release of computer software is maintained for a longer period of time than the standard edition.https://en.wikipedia.org › wiki › Long-term_supportLong-term support - Wikipedia baseline (expected to release in September 2022) will require Java 11 or Java 17. It will not support Java 8.

What version of Java does Jenkins use?

Running Jenkins Jenkins requires Java 11 or 17 since Jenkins 2.357 and LTSLTSLong-term support (LTS) is a product lifecycle management policy in which a stable release of computer software is maintained for a longer period of time than the standard edition.https://en.wikipedia.org › wiki › Long-term_supportLong-term support - Wikipedia 2.361. 1. Read more about this in the announcement blog post.


1 Answers

teamcity agents are standalone JVM's. In the configuration of the agents , you can define which java version is used by default.

In case you do not mention any java version in your build targets(steps), the default java version of the agent will be used.

To do this, install the latest java on the host on which the agent runs. Then change the default JRE for the agent which is supposed to run java 8. After that you need to create a pool for agents that can run on java8 and make sure that your target is running on this agent. You can even map specific agents to a target through the section "Agent Requirements"

like image 142
Biswajit_86 Avatar answered Oct 23 '22 01:10

Biswajit_86