1

I installed minikube and started Jenkins inside a pod. I am able to create a new job and execute it inside a dynamically created maven container. However. I have a folder in my host machine which is a Mac based and I need that folder inside this dynamically created pod when the job is started. How can I achieve that?

Damien-Amen
  • 7,232
  • 12
  • 46
  • 75

2 Answers2

2

Option 1.

https://kubernetes.io/docs/setup/minikube/#interacting-with-your-cluster

configure kubectl on your MAC, then use kubectl cp <hostdir> <podname>:<dir>

Option 2.

use the Host path option for POD, like this post

Mount local directory into pod in minikube

sfgroups
  • 18,151
  • 28
  • 132
  • 204
1

Maybe the easiest solution is to push that folder as git repo ( if it is not large ) to either github or your private git server , and then clone it as a first step in your jenkins job.

Ijaz Ahmad
  • 11,198
  • 9
  • 53
  • 73
  • I have done this before. It was so easy. But now I cannot push it because it has some sensitive information. :( – Damien-Amen Nov 28 '18 at 21:35