I configured a pod template but I’m under the impression my Freestyle job is not running in the template.
- CloudBees Core on modern cloud platforms - Managed Master
- CloudBees Core on traditional platforms - Client Master
- CloudBees Jenkins Enterprise - Managed Master
- CloudBees Jenkins Platform - Client Master
- CloudBees Jenkins Distribution
- Jenkins LTS
When you configure a pod template for a freestyle job, the important thing to understand is that you cannot choose the container that your steps will run in.
This is one of the major differences with the Pipelines.
The build steps of a Freestyle job will always run in the
Therefore, you need to override the
jnlp container in the pod template.
The important thing is that this
jnlp container should have a jdk8 available, as the
agent.jar (remoting), will run in this container. The pod template should have the following field setup:
- Pod Template > Container Template > Name: jnlp
- Pod Template > Container Template > Docker image: any image with a jdk8 in the
- Pod Template > Container Template > Command to run: you need to either set this field empty to inherit the default configuration, or use
- Pod Template > Container Template > Arguments to pass to the command: you need to either set this field empty to inherit the default configuration, or use
- Pod Template > Volumes: the default configuration should inject for you the Config Map that the agent needs to get started. On older installation, you should manually add a Config Map Volume with Config Map name: jenkins-agent and Mount path: /var/jenkins_config.