Yes, I'm quite willing to share the simple script I wrote. Keep in mind
that it is not a general solution, but addressed my needs in a very
specific Jenkins setup. The Python script relies on the psycopg2 library
to talk to Postgres and the jenkinsapi package to talk to Jenkins.
Put all attached files in the same directory. First, you will need to
create your Postgres database. The SQL statements in jenkins_schema.sql
should do this for you if you run it via psql. You will certainly want
to modify TEST_JOB_RE to match the job names you're interested in or
simply remove the job name check to get all of them.
You will need to modify the Postgres username and password hard coded in
update_build_db.py and the Jenkins URL and credentials in jenkins.ini.
Then, you should be able to run update_build_db.py as a script to update
your Postgres db with job and build information from Jenkins.
Ballantyne, Bob wrote:
> This sounds remarkably similar to a task on my current 'to-do' list.
> Even the PostgresQL db and the analysts use case. I had intended
> using Groovy.
>
> Any chance if posting this somewhere on the Jenkins plugin site, or on
> Scriptler? I'm sure there are probably many others who would be VERY
> interested.
>
>
> On Jul 10, 2013, at 5:29 PM, "JonathanRRogers"
> <
jonatha...@gmail.com <mailto:
jonatha...@gmail.com>> wrote:
>
>>
>>
>> On Friday, June 28, 2013 4:14:46 PM UTC-4, Michael Barbine wrote:
>>
>> Hello!
>>
>> I'm looking for some input on a proven way to put all of the data
>> contained in the Jenkins XML or API into a RDBMS. Doesn't matter
>> which one... I can move it around later.
>>
>>
>> What do you mean by "all the data"? More importantly, what is the
>> ultimate goal? I wrote a script which extracts job and build
>> information via the Jenkins API and inserts/updates a PostgreSQL
>> database so I could analyze it more easily. Is that similar to what
>> you're trying to do?
>> --
>> 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-use...@googlegroups.com
>> <mailto:
jenkinsci-use...@googlegroups.com>.
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Jenkins Users" group.
> To unsubscribe from this topic, visit
>
https://groups.google.com/d/topic/jenkinsci-users/wHxZ9dm-JE4/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
--
Jonathan Rogers