On Monday, September 17, 2018 at 11:29:33 AM UTC-4, Tristan FAURE wrote:
>
> Hello, 
> I need your advice, i want to achieve integration tests using several pods 
> :
>
> pod 1 : database postgresql
> pod 2 : build with maven image and test using a connection to pod 2
>
> To implement that I wanted to use IP address (with 
> ip.namespace.pod.cluster.local) of pod1, but I don't know if it is the 
> recommended way, and if it is i don't know how to get this IP address
>
> I have seen that I can have my pod agent name using env JENKINS_AGENT_NAME 
> but I don't know what is the best to share it from stages of pod1 in env 
> of pod2
>

This is more of a Kubernetes question than a Jenkins one. I am running 
Jenkins inside a K8S cluster and I'm not aware of anything Jenkins-specific 
that will do what you want. I use K8S clients including kubectl and the 
Python "kubernetes" package to query and manipulate objects directly. I run 
Postgres as a statefulset with a service so that any Jenkins slave running 
in the same K8S namespace can connect to it using the service name as 
hostname. Jenkins can run any external command you want, so which client 
executable or library makes the most sense depends on your experience and 
what you're trying to accomplish. 

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/21112f04-0cbc-4680-b763-102dfd030dca%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to