Denodo-Jenkins connection : jdbc

Hi,
Im new to Jenkins and im exploring the CI/CD process in denodo.
After some exploration and reading ive come to understand that we can connect to the denodo server from jenkins using jdbc.
Can anyone help me with the following queries:

  1. How can add jdbc.jar to the classpath of jenkins
  2. how can i connect and setup denodo-jenkins using jdbc and execute denodo scripts from jenkins

Thanks in advance

The Jenkins Pipeline best practices page advises that you should use Jenkins Pipeline steps as “glue” to connect other things rather than using Pipeline steps as “bricks” that are the primary structure.

In your case, I think that means that you create command line scripts in the language of your choice that perform the operations you want to perform, then you call those scripts from an sh step (or a bat step if Windows).

Don’t connect directly from the Jenkins controller to the database or other system. When you connect directly from the Jenkins controller to the database or other system, you then require Jenkins in order to develop, refine, and improve those tasks. Connect separately from something that you create, then call that separately created thing from an sh or bat step.

Hi,
thanks for the response but i am not planning to use it as a primary structure.
The idea here is to connect denodo to jenkins so that i can get output which will be used as a input in the pipeline. These scripts are not functionality driven scripts, these are basically to invoke a hook from jenkins to another tool.

I can see a couple options out of the box.

  1. You can find a plugin that already exists that does what you need.
  2. You can write a custom plugin to do whatever integration you need. Since I don’t know what denodo is, I can’t really say much more
  3. You can use some sort of cli script to talk to denodo, and just have your pipeline call that.

While jenkins pipeline is groovy, its not really designed to run whatever random java code you want. It would take a bit of effort to load jdbc into pipeline directly.

A quick google search gave me groovy - How can i use java libraries in a jenkins pipeline? - Stack Overflow, which I totally suggest against doing.

1 Like