0% found this document useful (0 votes)
422 views

00 Jenkins Notes

Jenkins is a popular open source automation server that enables continuous integration and delivery of software projects. It allows developers to automatically build, test, and deploy their code every time a new change is committed. Jenkins provides features like compilation, running tests, code coverage reporting, deployment to servers, build statistics, and extensibility through plugins. It is lightweight and can be run on a variety of platforms or integrated with version control systems and build tools.
Copyright
© © All Rights Reserved
Available Formats
Download as RTF, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
422 views

00 Jenkins Notes

Jenkins is a popular open source automation server that enables continuous integration and delivery of software projects. It allows developers to automatically build, test, and deploy their code every time a new change is committed. Jenkins provides features like compilation, running tests, code coverage reporting, deployment to servers, build statistics, and extensibility through plugins. It is lightweight and can be run on a variety of platforms or integrated with version control systems and build tools.
Copyright
© © All Rights Reserved
Available Formats
Download as RTF, PDF, TXT or read online on Scribd
You are on page 1/ 12

Introduction Notes

==============
- Game changer: I can say Jenkins is a
real game changer.
when Jenkins/CI came into picture, it
has changed the thought of software
development environment.
- It introduced the process improvements.
in the sense it enabled to continuously
deliver your software to production and
QA.
- A right CI tool can streamline the
development process right through the
development to deployment.
- It helps to detect the bugs faster and
provide useful dashboard for both
developers and non-developers.

- It provides a fast feed back if the build


fails.
- Reporting is one of Jenkins strong
points. It can generate graphs for build
and test cases.
Jenkins Featuers:
=================
Jenkins can be used:
1. compilation
2. running your unit, Integration tests.
4. Measuring your code coverage or any
other code quality metrics.
5. Deploy your code to Tomcat Or any
Application server.
6. We can also generate statistics for our
Builds, Test cases and any other tasks.
7. Jenkins acts as a nice reporting tool.

8. Jenkins is based on plugin mechanism,


so its extensible.
9. You dont need to spend efforts to
implement a new tool. Jenkins is a free
tool.
10. Tomorrow if you want to use different
SCM tool, you can just download and
install corresponding plugin and your job
is done.
C.I tools usage:
============
1.
Remember, the most basic function of any
Continuous Integration tool is to monitor
source code in a version control system
and to fetch and build the latest version of
your source code whenever any changes
are committed.
=====================

Build Kick of:


===============
5. We can ask Jenkins to to monitor the
repository and start a build whenever
there is a new change.

6. other approach building on regular


interval
7. Kick of manually
8. Kick of using post-commit hook of SCM
Jenkins Scheudules are configured using
cron syntax.
minutes(0-59) hours(0-23)
dayofthemonth(1-31) month(0-12)
dayoftheweek(0-7:sunday)
Range: * 9-5 PM(every minute of
everyday between 9-5 PM)
interval: */5 (every five minutes)
smoother convenient short hands: @daily,
@hourly..etc.
====

JUnit produce XML file as a result of your


tests. Jenkins understands this format and
generates nice graphical test reports and
statistics.
details of test failures,
how long your tests take to run- both
globally and per test.
====
plugins:
Jenkins plugins are very easy to install
and integrate smoothly into Jenkins
architecture.
code coverage: Cobertura plugin: works
well with Maven and Jenkins.
code coverage means: how much of you
application code is actually executed
during your tests.

this is useful in finding areas of code that


have not been tested by your test suites.
also helps to give some indication as to
how well a team is applying good testing
practices such as Test-Driven
development or Behaviour-Driven
development.
You can install jenkins plugin manually by
placing plugin file in
$JENKINS_HOME/plugins directory
YOU NEED TO RESTART TO SEE THE
FRUITS OF YOUR LABOUR.

=====

=====================
Installation
=====================
you can run Jenkins as stand-alone or
deploy in any conventional Java
application server.
requirements:
=============
- Java 5
- Builds tend to be both memory and
processor-intensive operations, and
Jenkins can be configured to run several
builds in parallel
- Depending on the number of build jobs

you are managing, Jenkins will also need


memory of its own for its own internal use
- The amount of memory required will
depend largely on the nature of your
builds,
- In particular, you should avoid memory
or CPU-intensive applications such as test
servers, heavily-used enterprise
applications, enterprise databases such
as Oracle, enterprise mail servers, and so
on.
- One very practical option available in
many organizations today is to use a
virtual machine. This way, you can choose
the amount of memory and number of
processors you think appropriate for your
initial installation, and easily add more
memory and processors later on as
required. However, if you are using a

virtual machine, make sure that it has


enough memory to support the maximum
number of parallel builds you expect to be
running.
- The memory usage of a Continuous
Integration server is best described as
spikyJenkins will be creating additional
JVMs as required for its build jobs, and
these need memory.
- Another useful approach is to set up
multiple build machines. Jenkins makes it
quite easy to set up slaves on other
machines that can be used to run
additional build jobs.
- the main Jenkins installation dispatches
the build job to the slave and reports on
the results
- Jenkins need both processor power and

memory.
-once you download the latest and
greatest Jenkins release and install,
Jenkins automatically starts at the port
8080.
windows: jenkins-x.x.msi
- It is also a useful strategy if certain
heavy-weight builds tend to hog the main
build serverjust put them on their own
dedicated build agent
set up group and user:
Its always good to have a separate group
and user for Jenkins. is makes it easier to
monitor at a glance the system resources
being used by the Jenkins builds, and to
troubleshoot problematic builds in real
conditions
sudo groupadd build

cat /etc/groups |grep build


sudo useradd --create-home --shell
/bin/bash --groups build jenkins

All:
$ java -jar jenkins.war

You might also like