Monday, 28 April 2014

Integrating Jenkins and Artifactory

Introduction:

Artifactory is an artifact repository manager and acts as a proxy between your build tool (Maven, Ant etc) and the outside world. Integrating Jenkins and Artifactory to publish, resolve, promote and release traceable build artifacts. It stores remote artifacts so that you don’t have to download them over and over again.also you can deploy your own artifact into repository for sharing between projects, storing buils artifacts, and for build release management. Artifactory can be deployed to any servlet container, but it come bundled with Jetty container.

Installing artifactory plugin:

step 1: Start jenkins and open jenkins home page in the browser. Click on Manage Jenkins


step 2: In the Manage Jenkins page click on Manage Plugins



step 3: Click on Available tab and check Artifactory Plugin checkbox. Click on "Download now and install after restart" button.


step 4: Plugin downloaded successfully. Restart the jenkins to activate the plugin.



step 5: Download an open source jfrog artifactory from the below link
http://www.jfrog.com/home/v_artifactory_opensource_download

step 6: unzip it and open <artifactory_dir>bin in the command prompt. Set java home and run artifactory.bat file using the following command. I am running artifactory at 18081 port.
artifactory.bat --httpPort=18081


step 7: After few seconds it shows successfully started.


step 8: Open the following url in the browser. http://localhost:18081/artifactory
for login default username is admin, password is password


step 9: No we need to configure artifactory url in the jenkins. Open Jenkins home page and click on Manage Jenkins.


step 10: In the Manage Jenkins page click on Configure System.


step 11: In the Artifactory section add artifactory url http://localhost:18081/artifactory
enter username and password of artifactory







Wednesday, 23 April 2014

Continuous integration with jenkins - installation part

Introduction:

Continuous Integration is the good practices used in software engineering.These good practices aim at checking that a source code modification does not lead to a regression on the developing software application. This checking is usually performed on a different machine than your development one (this machine is called an integration server); and this checking is carried out rather frequently, and so it's called Continuous Integration.

Jenkins is an open source and java based continuous integration tool. Jenkins enables teams to focus on their work by automating the build, artifact management and deployment processes. Jenkins can track metadata about builds, including the most recent failed and successful builds. It keeps build history and can provide console output. The console output of the build can be helpful in determining if a failure is due to the code or a mis-configured build server.

Jenkins -Workflow:


Installation:

Download Jenkins war file from http://jenkins-ci.org/

You can start Jenkins in two ways: using command line and deploying war as a application in weblogic server

using command line:

open terminal and go to the download location and type the following command to start the jenkins
     nohup java -jar jenkins.war &



after few seconds, jenkins will started


open browser and enter the following url, it opens jenkins home page http://<hostname>:/8080

using weblogic server:

start weblogic server and login. Click on Deployment in the Domain structure. Click on Install button.


click on upload your file(s)


 select Jenkins.war file

select Install this deployment as an application
   

click on Finish.


 open following link in the browser http://localhost:7001/jenkins/