0% found this document useful (0 votes)
17 views5 pages

Jenkins

The document outlines the Continuous Integration and Continuous Delivery (CI-CD) process using Jenkins, detailing five stages: Continuous Download, Continuous Build, Continuous Deployment, Continuous Testing, and Continuous Delivery. It provides step-by-step instructions for setting up Jenkins on a development server, including installing necessary tools and configuring the environment for deployment. Additionally, it describes how to create and manage Jenkins jobs for downloading code, building artifacts, and deploying applications to QA and production environments.

Uploaded by

robert.olinga
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views5 pages

Jenkins

The document outlines the Continuous Integration and Continuous Delivery (CI-CD) process using Jenkins, detailing five stages: Continuous Download, Continuous Build, Continuous Deployment, Continuous Testing, and Continuous Delivery. It provides step-by-step instructions for setting up Jenkins on a development server, including installing necessary tools and configuring the environment for deployment. Additionally, it describes how to create and manage Jenkins jobs for downloading code, building artifacts, and deploying applications to QA and production environments.

Uploaded by

robert.olinga
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

1st Session: Intro and AWS Signup Process

Continuous Integration - Continuous Delivery


Jenkins is a tool for performing CI-CD
CI-CD Stage
Stage-1: (Continuous Download)
Whenever developers create or modify code they upload into some
version controlling system (git, svn), Jenkins will immediately get a
notification and it will download the code from the remote version
controlling server. If the download is unsuccessful, Jenkins will send
notifications to the Version Controlling server admins

Stage-2: (Continuous Build)


The code downloaded in the previous stage has to be converted into
an artifact. This is called as the build process and it can be done using
tools like Ant, Maven, Gradle, MSBuild, Nant etc., These build tools as
installed as plugin in Jenkins and with their help Jenkins will cover the
code into an artifact. This artifact can be in the form of jar, war, ear,
exe etc files. If the build process fails ie if jenkins is not able to create
an artifact it will notify the developers that the build has failed and
developers will fix the defect and upload the modified code into
version controlling server

Stage 3 (Continuous Deployment)


The artifact created in the previous stage has to be deployed into the
QA environment where a team of testers can access the application
and test it. The QA environment might be running on some application
servers like tomcat JBoss, Weblogic application servers. Jenkins will
perform this deployment and if the deployment fails it will notify the
middleware team about the failure.
Stage 4 (Continuous Testing)
Jenkins will run the automation testing programs created by the
testers and check if the application deployed in the QA environment is
working properly. These automation testing programs can be created
by testers using selenium, jmeter etc., If the automation testing
programs fail jenkins will send notification to the testers and
developers.

Stage 5 (Continuous Delivery)


If testing passed Jenkins will deploy the application into the production
environment where it becomes live i.e the end user or client can start
accessing it.

DevServer
1. Install JDK
2. Jenkins
3. GIT, Maven

QA Server and Prod Server

2
1. tomcat8
2. tomcat8-admin

Installing Jenkins on the Devserver:


1. Connect to the devserver via gitbash
2. Update the apt repository
sudo apt-get update
3. Install jdk1.8
sudo apt-get install -y openjdk-8-jdk
4. Install git and maven
sudo apt-get install -y git maven
5. Download jenkins.war
wget http://http://mirrors.jenkins.io/war-stable/latest/jenkins.war
6. To start jenkins
java -jar jenkins.war
7. To access the homepage of jenkins
Launch any browser
public_ip_of_devserver:8080
8. In the unlock jenkins screen enter the admin password
9. Click on Install suggested plugins
10.Create first admin user

Setting up tomcat on QA and ProdServer


1. Connect to QAServer using git bash
2. Update the apt repository

3
sudo apt-get update
3. Install tomcat8
sudo apt-get install -y tomcat8
4. Install tomcat8-admin
sudo apt-get install -y tomcat8-admin
5. Set username and password in tomcat-users.xml file for jenkins do
deployment
sudo vim /etc/tomcat8/tomcat-users.xml
goto insert mode by pressing i
<user username="intelliqit" password="myintelliqit" roles="manager-
script" />
Save and quit Esc :wq Enter
6. Restart tomcat8 server
sudo service tomcat8 restart

Stage 1 (Continuous Download)


1. Open the dashboard of jenkins
2. Click on New item ---> enter the item name as development
3. Select Freestyle project ---> OK
4. Go to source code management
5. Select GIT
6. Enter github url where developers have uploaded the code
https://github.com/selenium-saikrishna/maven.git
7. Apply and save
8. Go to the dashboard of jenkins
9. Go to the development job and click on build icon

4
The above job will download all the code present in the remote
github repository into the devserver linux instance.

Stage-2 (Continuous Build)


1. Open the dashboard of jenkins
2. Go to the development job ---> click on configure
3. Go to build section ---> Click on add build step
4. Click on invoke top level maven targets
5. Enter the goal as package
6. Click on apply ---> Save
7. Go to the dashboard of jenkins ---> go to development job
8. Click on build icon
9. The above job will convert the code into an artifact. This artifact will
come in the format of a war file.

You might also like