Jenkins working with DB

58 views
Skip to first unread message

Виталий Фёдоров

unread,
Aug 31, 2016, 9:13:54 AM8/31/16
to Jenkins Users
Greetings, post my question here, because no information found at all in the net:
I have next workflow:
1. User commit code to the git.
2. User use tool sqitch (http://sqitch.org/) (not advertisement) for helping commit sql files. Also this sqitch tracks which sql files need to run before the other
3. After it jenkins should deploy sql files from git in production and update database
Is it real to update DB with Jenkins? I have some experience in working with Jenkins, but have no idea, where to start in this task. 
Best regards!

Rachel

unread,
Sep 2, 2016, 2:06:32 PM9/2/16
to Jenkins Users
Hi,

I evaluated Sqitch months ago and I think you can try to update databases from Jenkins, because of these reasons:
  • Jenkins includes Git Plugin to download code from Git repository.
  • Sqitch is based on shell commands and Jenkins includes possibility of writing them: Build > Execute shell. An option to execute Sqitch commands in Jenkins is to install Sqitch client with the same user you installed Jenkins (evaluate another options according to your environment).
Finally, ensure database connection from Jenkins server.

Please, tell me if you get it.

Best regards,
Rachel

Виталий Фёдоров

unread,
Sep 6, 2016, 12:16:15 PM9/6/16
to jenkins...@googlegroups.com
Greetings again,
Thank you for your answer, it is really helpful. I didnt get only 1 thing: what code should I get from git and where to deploy it?
I mean, what should be in the git repo, some sort of sql files?
I need to create the simplest job, at least, for the beginning. Also, I need to understand the workflow: git repo with (some sql files or I can use any, rest api, for example) --> Jenkins take files, execute shell to use sqitch (what commands should I execute?)--> where to deploy it? To database?
Hope, you will help me in this question,
Best regards,
Vitali

--
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/S-_nJYmLZdE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jenkinsci-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/848c4fa7-1efc-4946-ae44-3d1c267d7f5d%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages