Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to add some prebuild steps to jenkins?

I am a Jenkins newbie and need a little hand holding because we only maintain parts of our app in SVN. I have basic Jenkins install setup.

This is what I do to get a local DEV environment setup and need that translated to Jenkins in order to make a build:

  1. DO SVN checkout (and get the 2 folders that are under SVN)
  2. Delete the folders
  3. Copy over the full app from FTP location
  4. Do SVN restore
  5. download sql file
  6. Import into MySQL

How would I get the above mentioned steps in Jenkins? I know there are some post build steps that I can use. Just not sure how to put it all together. Any help will be much appreciated.

like image 221
jini Avatar asked Apr 12 '12 12:04

jini


1 Answers

Tell Jenkins about the SVN repository and it will check it out automatically when a new build is started. That should take care of 1. 2-5 would be build steps (i.e. execute shell commands). Basically, you can set up Jenkins to do exactly what you do on the command line, except that the first step is taken care of automatically if you tell Jenkins about the repository.

like image 156
Lars Kotthoff Avatar answered Sep 30 '22 23:09

Lars Kotthoff