- 1 Install Jenkins via Docker Image
- 2 Jenkins CLI
- 3 Plugins
- 3.1 Jenkins Interview Questions and Answers
Install Jenkins via Docker Image
Docker Pull Command :
docker pull jenkins
you can install Jenkins via Kinematic as well..
$ docker run --name MyJenkins -p 8080:8080 -p 50000:50000 -v /your/home:/var/jenkins_home jenkins $ docker run --name MyJenkins -p 8080:8080 -p 50000:50000 -v /var/jenkins_home:/var/jenkins_home jenkins
$ docker ps -a #it shows all containers(stopped and run) $ docker ps #shows only running containers $ docker volume create myjenkins $ docker volume ls $ docker inspect myjenkins #it shows details of values(physical address ..etc..) $ docker run --name MyJenkins -p 8080:8080 -p 50000:50000 -v myjenkins:/var/jenkins_home jenkins #you can use volumes instead of physical address
$ # go to Jenkins directory $ java -jar jenkins.war --httpPort=9090 #default is 8080
management of jenkins: goto localhost:8080 -> Click "Manage Jenkins / Configure Global Security" tick "enable security", if not
go to below CLI address on the browser
and download Jenkins-cli.jar
java -jar jenkins-cli.jar -s http://localhost:32771/ help
- Git Plugins
- Catligth - https://catlight.io/:
CatLight is a notification app for developers. It shows the current status of continuous delivery, tasks, and bugs in the project and informs when attention is needed
Jenkins Interview Questions and Answers
What is Jenkins?
Jenkins is an open source application for continuous integration and continuous delivery of application software.
What is Continuous Integration?
Typically, there are multiple developers writing code for a single application, so we need to perform integration test by integrating each new piece of code via testing it through as many tests as possible. This practice is called continuous Integration. Jenkins besides Hudson, Bamboo etc provides tools for continuous integration.
Tell me few advantages of Jenkins?
Here are some advantages of using Jenkins (or by any matter any integration tools) :
- It saves developer time: The foremost advantage of using Jenkins is that since most of the integration task is being handled by Jenkins (via automatic integration), the developer time is focused on development activities mostly.
- Improved software quality: Since the software is being tested immediately after any code check-in, it keeps the quality check frequently, thus improving overall software quality.
- Faster Delivery: Jenkins automatically does continuous integration, which leads to very early detection of bugs / defects and hence it leads to faster delivery of software.
- Decreased development time: Since most of the integration work is automated by Jenkins, it leads to the faster development of application.
- Easily portable:Since Jenkins is developed using Java, it can be easily portable to other platforms.
- Early tracking of defects: Jenkins helps tacking of defects at very early stage in development environment only rather than production environment.
- Email Notification to developers:Jenkins can be easily integrated with LDAP server, so developer are notified about build success / failure via mail.
What are the commands to start Jenkins manually?
- <jenkins_url>/restart : Force restart (will not wait for ongoing build to complete)
- <jenkins_url>/safeRestart : Wait for all builds to complete before restarting.
Mention few plugins of Jenkins?
Here are some plugins that can be used with Jenkins:
- Delivery Pipeline
- Join Plugin
- Copy Artifact
- Android Emulator
- Amazon EC2
- Openstack Cloud
- CloudBees Folders
What are the two most important components Jenkins is integrated with?
Jenkins is integrated with these two components mainly:
- Version Control System like SVN, GIT
- Build tools like Maven