Jenkins is one open source tool to perform continuous integration and build automation. The basic functionality of Jenkins is to execute a predefined list of steps.
Basically Continuous Integration is the practice of running your tests on a non-developer machine automatically every time someone pushes new code into the source repository.
This has the tremendous advantage of always knowing if all tests work and getting fast feedback. The fast feedback is important so you always know right after you broke the build (introduced changes that made either the compile/build cycle or the tests fail) what you did that failed and how to revert it.
Built on top of Continuous Integration are Continuous Deployment/Delivery where after a successful test run your instantly and automatically release the latest version of your build. Makes deployment a non-issue and helps you speed up your development.
Let's discuss how to use the Jenkins continuous integration build server.
To Run Jenkins It is prerequisite to have java (java7 & newer version) & any web server must have been installed.
1. Download Jenkins
Download War file of Jenkins from Official Website of Jenkins. There are 2 options Weekly Release & LTS Release.
Ubuntu's Linux by default provide Jenkins under the directory /var/lib/jenkins.
You can update jenkins by downloading latest version & overwrite it with old version.
Keep this war file under the webapps folder of tomcat server.
2. Configure & Run Jenkins
Run following command on Command Prompt or Terminal in terms of linux. Make sure that you are navigate to the webapps directory.
F:\tomcat 9\webapps>java -jar jenkins.war
Once the process is complete following lines will display on command prompt,
By default Jenkins run on 8080 port. You can hit following url if you have installed jenkins locally. http://localhost:8080/
Sometimes 8080 port may use by other application so jenkins may not start on 8080. So you can run it on other port using following command.
F:\tomcat 9\webapps>java -jar jenkins --ajp13Port=-1 --httpPort=8082
Here you can run jenkins on 8082 port.
Now you can see the startup page of jenkins in which some plugins get download automatically if your internet connection is on or you can install plugins later. such installation is called as offline installation.
Here installation require initial admin password. It get display on command propmt also. or you can get it under config file.
Once you have done. You will see this dashboard.
You can manage Jenkins from left side link. Firstly We need Git Plugin to manage or to maintain Builds. So Goto Manage Jenkins link & Click on Manage Plugin link.
Once you install it you need to restart it.
After Restarting Jenkins click on New Item.
Now Follow these three steps.
Give your project details & save it.
Here your First Build get Ready.
You can check your project details on clicking Workspace.
Now You can Run your Test Suite that you created for project and can run those test cases once build is get modified.
Yes!!! So You can Manage your all Project builds from Jenkins Dashboard Now!!!
Basically Continuous Integration is the practice of running your tests on a non-developer machine automatically every time someone pushes new code into the source repository.
This has the tremendous advantage of always knowing if all tests work and getting fast feedback. The fast feedback is important so you always know right after you broke the build (introduced changes that made either the compile/build cycle or the tests fail) what you did that failed and how to revert it.
Built on top of Continuous Integration are Continuous Deployment/Delivery where after a successful test run your instantly and automatically release the latest version of your build. Makes deployment a non-issue and helps you speed up your development.
Let's discuss how to use the Jenkins continuous integration build server.
To Run Jenkins It is prerequisite to have java (java7 & newer version) & any web server must have been installed.
1. Download Jenkins
Download War file of Jenkins from Official Website of Jenkins. There are 2 options Weekly Release & LTS Release.
Ubuntu's Linux by default provide Jenkins under the directory /var/lib/jenkins.
You can update jenkins by downloading latest version & overwrite it with old version.
Keep this war file under the webapps folder of tomcat server.
2. Configure & Run Jenkins
Run following command on Command Prompt or Terminal in terms of linux. Make sure that you are navigate to the webapps directory.
F:\tomcat 9\webapps>java -jar jenkins.war
Once the process is complete following lines will display on command prompt,
By default Jenkins run on 8080 port. You can hit following url if you have installed jenkins locally. http://localhost:8080/
Sometimes 8080 port may use by other application so jenkins may not start on 8080. So you can run it on other port using following command.
F:\tomcat 9\webapps>java -jar jenkins --ajp13Port=-1 --httpPort=8082
Here you can run jenkins on 8082 port.
Now you can see the startup page of jenkins in which some plugins get download automatically if your internet connection is on or you can install plugins later. such installation is called as offline installation.
Now you need to create Admin user for it by filling basic information.
Here installation require initial admin password. It get display on command propmt also. or you can get it under config file.
Once you have done. You will see this dashboard.
You can manage Jenkins from left side link. Firstly We need Git Plugin to manage or to maintain Builds. So Goto Manage Jenkins link & Click on Manage Plugin link.
Once you install it you need to restart it.
After Restarting Jenkins click on New Item.
Now Follow these three steps.
Give your project details & save it.
Here your First Build get Ready.
You can check your project details on clicking Workspace.
Now You can Run your Test Suite that you created for project and can run those test cases once build is get modified.
Yes!!! So You can Manage your all Project builds from Jenkins Dashboard Now!!!











No comments:
Post a Comment