Download - Jenkins for java world

Transcript
Page 1: Jenkins for java world

SDL - KHTP

Jenkins(for JAVA world)

Page 2: Jenkins for java world

Agenda• Introduction

– What’s Continuous Integration?– CI Overview– What’s Jenkins?– Jenkins Architecture Overview– Execution Architecture– How we use Jenkins– Jenkins Features

• Installation & Configuration– Requirement– Installation– Manage Jenkins

• Configure System• Configure Global Security• Manage Plugins• Manage Nodes

• Jenkins Jobs– Build Steps– New Job

• Configuring Job– SCM Checkout– Pre-build Steps– Build Wrapper– Builder Runs– Recording– Notification

• Jenkins Benefits• Conclusion

Page 3: Jenkins for java world

INTRODUCTION

Page 4: Jenkins for java world

What’s Continuous Integration (CI)?

● Also referred to as "build automation"● Basic concept

o CI server continuously integrates newly checked-in code into a build

o Runs unit tests and rejects the build if they fail – (Optional)

o Deploy builds to other servers – (Optional)

Page 5: Jenkins for java world

CI Overview

Page 6: Jenkins for java world

What’s Jenkins?

● Continuous Integration (CI) server

● Formerly known as Hudson

● Java Based, Open sourceo Runs in servlet container such as

Tomcat, JBOSS

● Plugin Extensibility – Support over 400

Page 7: Jenkins for java world

Jenkins Architecture Overview

Page 8: Jenkins for java world

Execution Architecture

Page 9: Jenkins for java world

How We Use Jenkins

Developercommits code to

SVN Server

Jenkins jobs scheduled to

check for new code in SVN

JenkinsIf n

ew code exists, Jenkins

does SVN checkout

ServerJenkins builds WAR, deploys to server

Page 10: Jenkins for java world

Jenkins Features

• Integrate with repository

• Checkout the codes

• Distributed Builds

• Build and test

• Generate test report

• Notification

• Archive and store in artifact repository

• Deploy

Page 11: Jenkins for java world

JENKINS - INSTALLATION

Page 12: Jenkins for java world

Jenkins Requirements

• Web Server (Tomcat, JBOSS, …)

• Build tool (Maven, Ant)

• SCM (Svn, Git, …)

Page 13: Jenkins for java world

Jenkins Installations

• Download the WAR file from Jenkins Homepage

• Deploy it to the Tomcat server

• Start the Tomcat service• Jenkins can be accessible thru –

http://localhost:8080/jenkins

Page 14: Jenkins for java world

Jenkins – Main Page

Page 15: Jenkins for java world

CONFIGURE JENKINS

Page 16: Jenkins for java world

Jenkins Administration

Administrator User

Page 17: Jenkins for java world

Manage Jenkins

Configure System

Page 18: Jenkins for java world

Configuring JDK & Build Tools

JDK

ANT

MAVEN

Page 19: Jenkins for java world

SVN

ARTIFACTORY

SMTP

Page 20: Jenkins for java world

Manage Jenkins

Configure Global Security

Page 21: Jenkins for java world

Secure Jenkins

Page 22: Jenkins for java world

Manage Jenkins

Manage Plugin

Page 23: Jenkins for java world

Jenkins Plugins Manager

Page 24: Jenkins for java world

Jenkins Plugins Manager

Page 25: Jenkins for java world

Jenkins Plugins Manager

Page 26: Jenkins for java world

Manage Jenkins

Manage Nodes

Page 27: Jenkins for java world

Distributed Build

Page 28: Jenkins for java world

Jenkins – Configure Node

Page 29: Jenkins for java world

Jenkins – Configure Node

Page 30: Jenkins for java world

JENKINS JOBS

Page 31: Jenkins for java world

Jenkins – Build Steps

Page 32: Jenkins for java world

Jenkins - New Job

Page 33: Jenkins for java world

Integration with external tools

CONFIGURE JENKINS JOBS

Page 34: Jenkins for java world

Jenkins – Job Configuration

Page 35: Jenkins for java world

Job Configuration – Cont’d

Page 36: Jenkins for java world

Job Configuration – Cont’d

Page 37: Jenkins for java world

Job Configuration – Cont’d

Page 38: Jenkins for java world

Job Configuration – Cont’d

Page 39: Jenkins for java world

Jenkins Sample – Job Status Page

Page 40: Jenkins for java world

Jenkins Benefits

• Jenkins plugins extensibility makes Jenkins to adapt to many systems

• Jenkins provides everything for a robust continuous integration system which helps a lot for team that practice Agile

• Jenkins continuously providing access to the working copies of software which supports the Agile principle

Page 41: Jenkins for java world

Conclusion

• CI is very important for complex projects that practice Agile

• Jenkins is very good CI build server due to it’s ;

• Core Features• Plugins Extensibility• Flexibility

Page 42: Jenkins for java world