I have configured jenkins using its docker image to scale and deploy it on a kubernetes cluster (minikube) using the kubernetes plugin and successfully able to generate the slaves dynamically. But I am not able to run groovy scripts by passing the file path of the the groovy file on the slave. I have tried using SSH and scp command but not able to run the scripts on slave node. Any other idea??
To try I created a sample groovy file on the slave node and gave its path to the groovy plugin and tried to build the job which works. Can we create a file in our local system and make it run on the slave node.