Session 13: Putting it all together with Jenkins
Objectives
- Purpose and Installation of Jenkins
- Configuration of Jenkins
- Building Jenkins Jobs
- Running Jobs and Reporting
- Demonstration of a live project
- Selenium Grid
- Interview questions and answers
Project URL: https://github.com/autocodejam/TechfiosBeginner.git
Notes
Jenkins Installation: https://www.youtube.com/watch?v=MlvNXFdPhB8
1. Go to https://jenkins.io/download/
2. Click on Windows. Download will begin.
2. Click on Windows. Download will begin.
3. Unzip the file and double click on Jenkins .msi file to start installation, (See below)
4. Click Next, Next, Install, Yes, and Finish,
5. Open chrome and type in localhost:8080
6. Copy/paste the red path into your file explorer and select NotePad,
7. Paste the KEY in the Administration Password field,
8. Click install suggested plugin and wait,
9. Write admin in all fields except email address. Provide your email. Click Continue as Admin, Save and Finish, and Start using Jenkins.
10. Go to Manage Jenkins,
11. Go to Manage Plugins,
JENKINS CONFIGURATION:
PREREQ: System environment
1. JAVA_HOME
2. MAVEN_HOME
3. M2_HOME
4. Clone Project into your local: https://github.com/autocodejam/TechfiosBeginner.git
5. Update Chrome Driver,
6. Build and run the project.
7. Follow the steps to download Jankins
LEVEL 1
1. Configure JDK:
Manage Jenkins > Global tool configuration
a. Add JDK
b. Uncheck Install Automatically
b. Paste the JAVA_HOME path
2. Configure Maven:
Manage Jenkins > Global tool configuration
a. Add MAVEN
b. Uncheck Install Automatically
b. Paste the MAVEN_HOME path
LEVEL 2
1. Install maven pluggins:
Manage Jenkins > Manage Pluggins
a. Click on Available
b. Search maven
c. Check all with title maven
d. Click install without restart
2. Install github pluggins:
Manage Jenkins > Manage Pluggins
a. Click on Available
b. Search github
c. Check all with title maven
d. Click install without restart
LEVEL 3:
1. Configure project:
a. Right click on the pom.xml > Properties,
b. Copy the local path,
c. Go to Jenkins > Create New Job
d. Type a job name in the field,
e. Check Maven Project > OK,
f. Scroll down to Build
g. Paste project pom path in Root Pom field
h. Type "clean install" in Goals and Options field
i. Click apply > Save.
2. Ready to kick off the automation!!!!
a. Go to Jenkins > click on the job,
b. Click Build Now
c. Click on the rolling bar
d. Click console out
e. Click on Report
1. JAVA_HOME
2. MAVEN_HOME
3. M2_HOME
4. Clone Project into your local: https://github.com/autocodejam/TechfiosBeginner.git
5. Update Chrome Driver,
6. Build and run the project.
7. Follow the steps to download Jankins
LEVEL 1
1. Configure JDK:
Manage Jenkins > Global tool configuration
a. Add JDK
b. Uncheck Install Automatically
b. Paste the JAVA_HOME path
2. Configure Maven:
Manage Jenkins > Global tool configuration
a. Add MAVEN
b. Uncheck Install Automatically
b. Paste the MAVEN_HOME path
LEVEL 2
1. Install maven pluggins:
Manage Jenkins > Manage Pluggins
a. Click on Available
b. Search maven
c. Check all with title maven
d. Click install without restart
2. Install github pluggins:
Manage Jenkins > Manage Pluggins
a. Click on Available
b. Search github
c. Check all with title maven
d. Click install without restart
LEVEL 3:
1. Configure project:
a. Right click on the pom.xml > Properties,
b. Copy the local path,
c. Go to Jenkins > Create New Job
d. Type a job name in the field,
e. Check Maven Project > OK,
f. Scroll down to Build
g. Paste project pom path in Root Pom field
h. Type "clean install" in Goals and Options field
i. Click apply > Save.
2. Ready to kick off the automation!!!!
a. Go to Jenkins > click on the job,
b. Click Build Now
c. Click on the rolling bar
d. Click console out
e. Click on Report
Jenkins Resources:
Change Jenkins port:
java -jar jenkins.war --httpPort=8081
Fix Error 740: https://www.youtube.com/watch?v=gRrchEqUrU0
java -jar jenkins.war --httpPort=8081
Fix Error 740: https://www.youtube.com/watch?v=gRrchEqUrU0