openshift / jenkins-plugin

Apache License 2.0
81 stars 50 forks source link

Dynamically find pod name for openshiftExec #108

Closed jamestenglish closed 7 years ago

jamestenglish commented 7 years ago

Is there any way to query pod names for a deployment? I'd like to be able to dynamically query pods in order to feed that into the "openshiftExec" command. Do any of the other DSL commands allow that, or is there anyway inside Jenkins to accomplish that?

gabemontero commented 7 years ago

At the moment, not from openshift-pipeline / jenkins-plugin.

The oc command is of course baked into the openshift jenkins image. In the interim you could use sh 'oc...' to get the pod list and save it in a form that your pipeline script could then seed the openshiftExec step with.

But at first blush I think the scenario is at least worth exploring. In theory we could provide a more user friendly experience here.

I've opened this trello card to track the requirement. I've put a link to this issue there.

A process note: we close enhancement request github issues once we move the request to trello. But if there are any specifics to the scenario you'd like to provide, and you are adverse to trello, feel free to put them here as well.

thanks

@bparees @jupierce FYI

gabemontero commented 7 years ago

FYI @jamestenglish - if you are still interested in this jenkins / openshift scenario, it can be achieved with a new plugin currently under development by our team. Our current thought is that in the long term it will replace this plugin.

Please see https://github.com/openshift/jenkins-client-plugin