- Jenkins :used for Continuous Integration and continuous delivery
- ******************* Jenkins installation *******************************
- Download Jenkins war file from - https://jenkins.io/
- Place the war file at E:\Jenkins
- Go to windows command prompt where jenkins.war is placed and run -
- E:\Jenkins\ java -jar jenkins.war --httpPort=9090 ( To start jenkins (standalone) on a diff port )
- Capture the password , or get it from E:\Jenkins\secrets\initialAdminPassword
- Do not save the password if asked by browser
- Go to browser - http://localhost:8080 (Jenkins window should show up)
- Select plugins to install ---> Click suggested and click install
- Get started with Jenkins
- From C:\Users\<logged inuser>\.jenkins move all stuff to E:\Jenkins\JenkinsHome
- ******************* Tomcat installation *******************************
- Download Tomcat and unzip it and place in E:\Tomcat folder
- Copy/Place the jenkins.war file inside E:\Tomcat\webapps folder
- Step 4 : Set Environment Variables
- verify if Jenkins is running on tomcat : http://localhost:8080/jenkins
- Verify if Tomcat started http://localhost:8080
- To restart running Jenkins http://localhost:8080/jenkins/restart
- To Start and Stop Tomcat from command prompt :
- To see all commands list for CLI http://localhost:8080/jenkins/cli/
- How to change default port 8080 : Go to E:\Tomcat\conf >> Edit server.xml >> Search "Connector port" >>Replace "8080" by your port number >>Restart tomcat server.
Help
video playlist for jenkins and Tomcat :
E:\Jenkins\ java -jar jenkins.war
OR
username
: admin
password : admin123
( password is captured at step 7
above)
System
Variable:
JENKINS_HOME = E:\Jenkins\JenkinsHome
CATALINA_HOME = E:\Selenium\Tomcat
JAVA_HOME
= E:\Selenium\Java\jdk131
JRE_HOME = C:\Program Files\Java\jre-10.0.2 ( without semicolumn)
CLASSPATH = E:\Selenium\Tomcat\lib;
PATH = %PATH%; %JAVA_HOME%\bin;%CATALINA_HOME%\bin;%CLASSPATH%\servlet-api.jar;
To start
Tomcat run E:\Tomcat\bin\startup.sh
To
shutdown tomcat E:\Tomcat\bin\shutdown.sh
To start
--> E:\Tomcat\bin\startup
To
Stop -->E:\Tomcat\bin\ shutdown
Common Plugins:
- Role-based Authorization Strategy
- Deploy to container Plugin
- Credentials Plugin
- Email Extension Plugin
- Build pipeline
- Delivery Pipeline Plugin
- Blue ocean
- poll mailbox trigger plugin
- Build Monitor view
status notifier tool for Jenkins : CatLight.io
+++++++++++++++ Automatic Deployment Steps +++++++++++++++++++++++
Add Post build actions: Deploy war/ear to container
war/EAR files : **/*.war
context path : sample ==> without .war extension
containers : Add Container (eg Tomcat9)
Manager user name : deployer
Manager password : deployer
Tomcat URL : http://localhost:8080/jenkins/
e:\Tomcat Folder >> conf >> tomcat-user.xml
>> add below line at matching place
<user username="deployer" password="deployer" roles="role1"/>
No comments:
Post a Comment