First off, you don’t need to write a plugin.  You may need to install one, but 
not write one.

You will probably need to read the Jenkins documentation at some point, but you 
may be able to fumble through this without it.  The main site is at 
Jenkins-ci.org; click on “use jenkins” for a sort of startup.

You will need to build a job.  If you just installed Jenkins, you’ll be able to 
do that; if somebody else did that and has set up permissions, you will 
probably need to ask the admin permission to do this.  For that matter, maybe 
said admin can help (that is, if you have one).

When you create a new job, it’s all configured via the Web, so there’s not a 
lot of “programming” to do.  You will have to tell it how to get its sources.  
If you’re pulling it out of source control, you may need to install a plugin 
(Manage Jenkins->Manage Plugins) for the system you’re using.  Once you have 
the right plugin, you should be able to select the system and tell it the 
particulars (where the server is, how to access it, which set of files to get). 
 If you can’t configure it all there, you will have to go to Manage 
Jenkins->Configure System, search for your source control system, and feed it 
some information there.

Once you can get the sources, you need to create a build step to build your 
project.  Again, you may or may not need a plugin.  I believe that the default 
Jenkins can run shell tasks (including batch files for Windows machines), Ant 
targets and maybe Maven targets.  If you need to build another way, you may 
need to install a plugin for it.  On the other hand, if you can’t use a shell 
step, you probably can’t do it from Jenkins at all (for example, if you need to 
build from an IDE like Eclipse or Visual Studio).  If you’re building code from 
the GUI and now want to get automated builds, you have a challenge ahead of 
you; you need to be able to build without the GUI before you can even think of 
Jenkins or most automated build tools.

Now that you have the project built, I’d recommend some sort of testing step.  
If you have automated test suites, get them running here.  Again, you may want 
to install a plugin.  Out of the Box, Jenkins at least handles Junit, IIRC.

Once done testing (if you decide to do that), you need to push out to the 
production server.  If you can just do that from the command line, make it a 
shell build step. If not, there are (of course) a set of plugins to do the job 
for you.  Look for “Artifact uploaders” and you’ll see ways to do this via FTP, 
SCP, app server deployment (push a WAR file to Tomcat or some such), and more.

--Rob

From: [email protected] 
[mailto:[email protected]] On Behalf Of Hussein B.
Sent: Monday, September 03, 2012 10:35 AM
To: [email protected]
Subject: Writing Jenkins configuration files

Hi,

I have been asked to write a Jenkins configuration file for our project to do:
1. build the project
2. push to production server

I'm new to Jenkins, how to do that? Am I asked to write a plugin for Jenkins?

Thanks for help and time.

The information in this message is for the intended recipient(s) only and may 
be the proprietary and/or confidential property of Litle & Co., LLC, and thus 
protected from disclosure. If you are not the intended recipient(s), or an 
employee or agent responsible for delivering this message to the intended 
recipient, you are hereby notified that any use, dissemination, distribution or 
copying of this communication is prohibited. If you have received this 
communication in error, please notify Litle & Co. immediately by replying to 
this message and then promptly deleting it and your reply permanently from your 
computer.

Reply via email to