This option lets you provide a container image that does not extend the Jenkins agent image.
The provided container image must have a (headless) JRE installed (using a version compatible with the current Jenkins version).
The agent will use the Java installation designated by the JENKINS_JAVA_BIN environment variable, or the one in PATH if undefined.
Enabling this option will override the command and arguments defined in the agent container.
Example
podTemplate(agentContainer:'foo',
agentInjection: true,
yaml:'''
spec:
containers:
- name: foo
image: eclipse-temurin:22.0.2_9-jre
''') {
node(POD_LABEL) {
sh 'true'
}
}