Jenkins setup:
Jenkins: 2.440.1
OS: Linux - 3.10.0-1160.36.2.el7.x86_64
Java: 17.0.10 - Eclipse Adoptium (OpenJDK 64-Bit Server VM)
I have developed a shared library that has come to a point where it requires java dependencies not bundled with jenkins.
I have been testing these features on a jenkins docker installation and using an agent configured to launch via SSH.
While on this environment, the @Grab annotations that I specify populate the cache under ${JENKINS_HOME}/.groovy/grapes, taking some time to download the dependencies, and uses that cache on subsequent runs; I verified that the cache is used by noticing that the stage that specifies that @Grab annotations takes only a couple of seconds to run.
The issue I am facing is that when I move to a Jenkins instance with the setup I referenced above it still fills the cache with the packages but does not use that cache on subsequent runs and still pulls them from an online repository.
I am having this issue with pipelines that run on kubernetes pods defined with the kubernetes plugin.
Version of the Kubernetes plugin in use: 4306.vc91e951ea_eb_d
Can someone help me with this issue?