Jenkins is popular open source Continuous integration tool. It was written entirely in Java. Jenkins is a self-contained automation server used for automating builds, tests and deployment.
See below the steps for configuring Jenkins to automate the build and deployment for the Java project we already set up in GitHub.
See below the steps for configuring Jenkins to automate the build and deployment for the Java project we already set up in GitHub.
pre-requisites:
- Java Project is setup in GitHub or your SCM
- Jenkins is up and running
- Tomcat is up and running
- Make sure you configure maven installation under Jenkins-->manage Jenkins-> Tools . under maven installation. enter Maven3 as name and check install automatically option, no need to enter path of Maven home.
- Also install deploy to container, Jacoco plugins under Jenkins --> Manage Jenkins --> Manage plug-ins
Deploy to container
JaCoCo
Click on without restart.
steps to automate MyWebApp project in Jenkins:
1. Login to Jenkins. Click on New item.
2. Enter an item name --> select Free style project.
enter name as myFirstAutomateJob. click OK.
enter name as myFirstAutomateJob. click OK.
under credentials --> click Add- > select Jenkins --> enter your GitHub username and Personal Access Token as password. DO NOT use Git Hub password as it is removed from August 13, 2021. Click to here to learn how to generate Personal Access Token. Add description as my SCM credentials.
Enter main as branch specifier or which ever branch you want to check out.
select Maven3 from drop down and goal as clean install
10. click on Add container , select Tomcat 9.x
11. click on add credentials, enter tomcat as user name and password as password.
select it from drop down.
click Apply, click Save
click on build now..It should build.
if there is any error, please check the console output. Most of the common error would be checking the path of Maven installation, valid credentials for GitHub or Tomcat. Also make sure you install the plug-ins.
After successful deployment, please make sure you check the output in Tomcat by going to browser and enter below URL
Apart from that, you might have to interact with customers, vendors and outside business partners hence, for such instances you need to develop some skills in order to increase your productivity.go check out
ReplyDeleteThank you very much for this useful article. I like it. World talent jobs
ReplyDeleteclean installation and deployment
ReplyDeleteCoach, Tomcat port number from previous lab was 8090, but you left it as 8080 here. I understand 8080 is the default for Tomcat.
ReplyDeletehttp://please_change_per_public_dns_name_of_EC2:8080/MyWebApp
very good observation
DeleteBut you are not alone, many people just like you, during their working lifetime change careers not once but many times. profile
ReplyDeletenot building in Jenkins....having deploy war/ear to container error. How do i fix this
ReplyDeleteselect Tomcat 8.x Remote instead of Tomcat 9.x. it worked for me after numerous!
DeleteVideos likewise create 1200% a bigger number of offers than both text and pictures consolidated.https://www.buyyoutubesubscribers.in/
ReplyDeleteThere is so much in this article that I would never have thought of on my own. Your content gives readers things to think about in an interesting way. Thank you for your clear information. IT Recruitment
ReplyDeleteBy allowing you to see the quantity of perspectives on every video you can see what items or administrations potential clients are really intrigued by.buy youtube watch hours
ReplyDeleteI really enjoy the blog. Really looking forward to read more. Keep writing.
ReplyDeleteknow more
Really awesome blog & great work :)
ReplyDelete