25

I installed Jenkins on Ubuntu 10.10 and I could not find any mention of setting up database for data persistance.

So the first question is where does the data get stored, and secondly, can we setup Hudson / Jenkins with mySQL ? or similar databases?

1
  • In a file system, typically, something like /var/lib/jenkins/, /var/jenkins_home/ or /home/jenkins/. Mar 8, 2018 at 11:25

4 Answers 4

14

Hudson/Jenkins doesn't quite work that way. It stores configurations and job information in /var/lib/jenkins by default (if you're using the .deb package). If you want to setup persistence for a specific application, that's something you'll want to handle yourself - Hudson is a continuous integration server, not a test framework.

Check out the Wiki article on Continuous Integration for an overview of what to expect.

6
  • 2
    @Redmumba i understand its a CI Server, but i was merely looking into the possibility of it being used to drive unit tests and persisting the results in a database instead of flar files. As Jenkins CAN be used to drive and display tests. Any thoughts?
    – kamal
    Feb 8, 2011 at 19:40
  • A build is much more than a compile (or its dynamic language variations). A build may consist of the compilation, testing, inspection, and deployment—among other things. A build acts as the process for putting source code together and verifying that the software works as a cohesive unit.
    – kamal
    Feb 8, 2011 at 20:27
  • 1
    Like I said, Jenkins is just a CI server--its not a framework. For all sakes and purposes, Jenkins is just running scripts you specify--it doesn't care about persistent storage, the languages you use, or even what you're doing. That's where I think the disconnect is--Jenkins doesn't provide persistent storage for your application, etc..
    – Andrew M.
    Feb 8, 2011 at 20:30
  • 1
    ref: from the book "Continuous Integration: Many consider CI without automated, continuous testing not to be CI. We couldn’t agree more. Without automated tests, it is difficult for developers or other project stakeholders to have confidence in software changes. Most developers on projects that use a CI system use unit- testing tools such as JUnit, NUnit, or other xUnit frameworks to run tests. Furthermore, you can run different categories of tests from a CI system to speed up your builds. These categories may include unit, component, system, load/performance, security, and others.
    – kamal
    Feb 8, 2011 at 22:12
  • 1
    Right; so we're on the same page. Jenkins runs these things--it doesn't manage persistence layers, test frameworks, build tools (except for ant), etc.. You'll need to build your persistence layer and tests separately. Jenkins can graph unittests if they're outputted in xunit format, which is something the Java testing frameworks provide; many other languages (such as Python's nose) will output in that format too.
    – Andrew M.
    Feb 9, 2011 at 0:26
7

Jenkins can seem like it is storing data, based on what your scripts are doing and how.

As an example; the scripts that run your daily commit builds can be setup to hand off the "pass/fail" results to Jenkins to store in an XML file. Then, if you are ever interested in pulling up the historical "pass/fail" results and using them somewhere other than in the Jenkins GUI, you can make a call into the Jenkins API and get a return of that XML. Parse it and you've got the data you need.

But -- Other than doing this, Jenkins has no repository system all by its lonesome.

In addition, following is the jenkins api information: https://wiki.jenkins-ci.org/display/JENKINS/Remote+access+API

2

The answer is that jenkins will not set this up for you. You need to tell it how to setup the environment and how to execute it's tests. This is normally done in the build steps section. If you will provide more info as to which platform you are using them perhaps we could give you a more concrete answer. You could have a shell script that will install your application and run it's tests, and then you call that from hudson. Making the test runner output data in a hudson-friendly way to finally get the results of your tests into the webUI for viewing those.

2

It stores data in your home directory in a .jenkins directory. You can find all relevant information related to your builds in this directory.

Jenkins not provides build in support for connecting to any database.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .