- What is continuous integration?
- What is the programming language used to build Jenkins?
- What is the requirement for using Jenkins?
- Explain how you can move or copy Jenkins from one server to another?
- Mention what are the commands you can use to start Jenkins manually?
- Mention some of the useful plugins in Jenkin.
- What is a Cron Job?
- Explain how you can deploy a custom build of a core plugin?
- Explain how can create a backup and copy files in Jenkins?
- Explain how you can clone a Git repository via Jenkins?
- Can you start Jenkins using command line? How?
- What is a job in Jenkins?
- Explain how you can set up Jenkins job?
- Mention what are the two components Jenkins is mainly integrated with?
- What is the difference between Hudson and Jenkins?
- What is Groovy in Jenkins?
- What is Jenkinsfile?
- What is Jenkins Pipeline? What is a CI CD pipeline?
- What is Quite period in Jenkins?
- How do you delete old builds?
- Why do we use Nodes in jenkins?
- How do you send the notifications whether build fails or success?
- What is SCM? Which SCM tools are supported in Jenkins?
- Which CI Tools are used in Jenkin?
- Which Environmental Directives are used in Jenkins?
- What are Triggers?
- What is Agent Directive in Jenkins?
- How will you define Post in Jenkins?
- What are Parameters in Jenkins?
- What is Flow Control in Jenkins?
- What are the basic requirements for installing Jenkins?
- What is the use of Backup Plugin in Jenkins?
- What is Maven? What is the benefit of integrating Maven with Jenkins?
- How can you clone a git repository via jenkins?
- What are the various ways in which build can be scheduled in Jenkins?
- What is Kubernetes? How can you integrate Jenkins with Kubernetes?
- Let us say, you have a pipeline. The first job was successful, but the second failed. What should you do next?
- What is the use of JENKINS HOME directory?
- How does Jenkins authenticate users?
- How can you use a third-party tool in Jenkins?
- What are the types of pipelines in Jenkins?
- What is DevOps and in which stage does Jenkins fit in?
- What is a DSL Jenkins?
- How do you create Multibranch Pipeline in Jenkins?
- What are the types of jobs or projects in Jenkins?
- What is blue ocean in Jenkins?
- What is Continuous Testing?
- How can you temporarily turn off Jenkins security if the administrative users have locked themselves out of the admin console?
- What do you mean by Pipeline as a Code?
- What are the ways to configure Jenkins node agent to communicate with Jenkins master?
- What is the tool used for provisioning and configuration?
- How can you decide the no. executors?
- Where did your plugins come from Jenkins?
- Is it possible to exchange jobs between two different jenkins?
- Which plugin is required to deploy a .war file into application server?
- How to re-execute a parameterized build without entering the parameter value when the job fails?
- How master system will communicate to slave system?
- How do you make a job to run only on slave node?
- How do you make all the jobs to be run only on slave node?
- What is SCM Checkout retry count?
- What are stages?
- What is Parallel in Jenkins?
- What is matrix-based security?
- What is a Snippet Generator?
In software development, when multiple developers or teams are working on different segments of same web application, we need to perform integration test by integrating all modules. In order to do that an automated process for each piece of code is performed on daily bases so that all your code get tested.
To use Jenkins you require
- A source code repository which is accessible, for instance, a Git repository.
- A working build script, e.g., a Maven script, checked into the repository.
- Slide a job from one installation of Jenkins to another by copying the related job directory.
- Make a copy of an already existing job by making clone of a job directory by a different name.
- Renaming an existing job by renaming a directory.
To start Jenkins manually, you can use either of the following
- (Jenkins_url)/restart: Forces a restart without waiting for builds to complete.
- (Jenkin_url)/safeRestart: Allows all running builds to complete.
- Maven 2 project
- Amazon EC2
- HTML publisher
- Copy artifact
- Green Balls
Cron Expression is a utility to schedule job periodically as per the user requirement in Jenkins.
- Stop Jenkins.
- Copy the custom HPI to $Jenkins_Home/plugins.
- Delete the previously expanded plugin directory.
- Make an empty file called
- Start Jenkins.
Jenkins saves all the setting, build artifacts and logs in its home directory, to create a back-up of your Jenkins setup, just copy this directory. You can also copy a job directory to clone or replicate a job or rename the directory.
To clone a Git repository via Jenkins, you have to enter the e-mail and user name for your Jenkins system. For that, you have to switch into your job directory and execute the “git config” command.
Yes, using jenkins.exe start.
A job or build job is a task or step in the entire build process. It could be compiling the source code, running unit tests, deploying the application to the web server and so on.
To create a project that is handled via jobs in Jenkins. Select New item from the menu, once this done enter a name for the job and select free-style job. Then click OK to create new job in Jenkins. The next page enables you to configure your job.
Jenkin is mainly integrated with two components
- Version Control system like GIT, SVN.
- And build tools like Apache Maven.
There is no difference between Hudson and Jenkins. Hudson was the former name of Jenkins, after going through several issues the name was changed to Jenkins.
Groovy is the default scripting language that is being used in the development of JMeter Version 3.1.
Currently Apache Groovy is the dynamic object-oriented programming language that is used as a scripting language for the Java platform. Apache Groovy comes with some useful features such as Java Compatibility and Development Support.
The text file where all the definitions of pipelines are defined is called Jenkinsfile. It is being checked in the source control repository.
The pipeline can be defined as the suite of plugins supporting the implementation and integration of continuous delivery pipelines in Jenkins.
Continuous integration or continuous delivery pipeline consists of build, deploy, test, release pipeline. The pipeline feature saves a lot of time and error in maintaining the builds. Basically, a pipeline is a group of build jobs that are chained and integrated in sequence.
Time gap between the builds. In seconds.
Delete old builds in following way: Go to –> General tab –> enable ‘Discard old Builds’ checkbox. Here we will set ‘Days to keep builds’ and ‘Max # of builds to keep’
- Single jenkins server will not handle the whole workload of large and heavier build projects.
- Sometimes we may required several different environments to test the builds. This will not be done by a single server.
- Configure Email Notification in Configure system under Mange Jenkins.
- Email notifications will be configured in job configuration under post-build section.
- SCM stands for Source Control Management.
- SCM module specifies the source code location.
- The entry point to SCM is being specified as jenkins_jobs.scm.
- The job specified with ‘scm’ attribute accepts multiple numbers of SCM definitions.
- GitLab CI
- Travis CI
- Go CD
Environmental Directives is the sequence that specifies pairs of the key-values called Environmental Variables for the steps in the pipeline.
Trigger in Jenkins defines the way in which the pipeline should be executed frequently. PollSCM, Cron, etc are the currently available Triggers.
The Agent is the section that specifies the execution point for the entire pipeline or any specific stage in the pipeline. This section is being specified at the top-level inside the pipeline block.
Post is a section that contains several additional steps that might execute after the completion of the pipeline. The execution of all the steps within the condition block depends upon the completion status of the pipeline.
The condition block includes the following conditions – changed success, always, failure, unstable and aborted.
Parameters are supported by the Agent section and are used to support various use-cases pipelines. Parameters are defined at the top-level of the pipeline or inside an individual stage directive.
In Jenkins, flow control follows the pipeline structure (scripted pipeline) that are being executed from the top to bottom of the Jenkins file.
- Java 7 or above.
- Servlet 3.1
- RAM ranging from 200 MB to 70+ GB depending on the project build needs.
- 2 MB or more of memory.
Jenkins Backup Plugin is used to back up the critical configurations and settings in order to use them in the future in case of any failure or as per the need of time.
Maven is a build management tool. It uses a simple pom.xml to configure all the dependencies needed to build, test and run the code. Maven manages the full lifecycle of a test project. Once integrated with Jenkins, the maven Webdriver will build the project and execute all tests efficiently.
If you want to clone a Git repository via Jenkins, you have to enter the e-mail and user name for your Jenkins system. Switch into your job directory and execute the “git config” command for that.
- By source code management commits.
- After completion of other builds.
- Can be scheduled to run at a specified time (crons).
- Manual Build Requests.
Kubernetes is a container orchestration tool. With Kubernetes, one can create multiple container instances to achieve more fault tolerance. You can use the Kubernetes deploy plugin to use it with Jenkins for continuous deploy.
You just need to restart the pipeline from the point where it failed by doing ‘restart from stage’.
All the settings, logs and configurations are stored in the JENKINS_HOME directory.
There are 3 ways:
- The default way is to store user data and credentials in an internal database.
- Configure Jenkins to use the authentication mechanism defined by the application server on which it is deployed.
- Configure Jenkins to authenticate against LDAP server.
Below are the steps used for working with a third-party tool in Jenkins.
- First install the third-party software.
- Download the plug-in that supports the third-party tool.
- Configure the third-party tool in the admin console.
- Then use the required plug-in from the Jenkins build job.
There are 3 types:
- CI CD pipeline (Continuous Integration Continuous Delivery)
- Scripted pipeline
- Declarative pipeline
DevOps is a software development practice that blends software development (Dev) with the IT operations (Ops) making the whole development lifecycle simpler and shorter by constantly delivering builds, fixes, updates, and features. Jenkins plays a crucial role because it helps in this integration by automating the build, test and deployment process.
The Jenkins “Job DSL / Plugin” is made up of two parts – first, The Domain Specific Language (DSL) itself that allows users to describe jobs using a Groovy-based language, and second, a Jenkins plugin which manages the scripts and the updating of the Jenkins jobs which are created and maintained as a result.
The Multibranch Pipeline project type enables you to implement different Jenkinsfiles for different branches of the same project. In a Multibranch Pipeline project, Jenkins automatically discovers, manages and executes Pipelines for branches that contain a Jenkinsfile in source control.
These are the types of jobs/projects in Jenkins –
- Freestyle project
- Maven project
- Multibranch pipeline
- External Job
- Multi-configuration project
- Github organization
It is a project that was started with the purpose to rethink the user experience of Jenkins, modeling and presenting the process of software delivery by surfacing information that’s important to development teams. This is done with as few clicks as possible, while still staying true to the extensibility that is core to Jenkins. While this project is in the alpha stage of development, the intent is that Jenkins users can install Blue Ocean side-by-side with the Jenkins Classic UI via a plugin.
Continuous Testing is the process where you execute automated tests as part of the software delivery pipeline. This is done so that you get the feedback on the business risks associated with software as early as possible. It consists of evolving and extending test automation to address the increased complexity and pace of modern application development and delivery.
Continuous Testing means that testing takes place on a continuous basis without any disruption of any kind. In a Continuous DevOps process, a software change is continuously moving from Development to Testing to Deployment. The code undergoes continuous development, delivery, testing and deployment.
The JENKINS_HOME folder contains a file named config.xml. When you enable the security, this file contains an XML element named useSecurity that changes to true. If you change this setting to false, security will be disabled the next time Jenkins is restarted.
However, we must understand that disabling security should always be both a last resort and a temporary measure. Once you resolve the authentication issues, make sure that you re-enable Jenkins security and reboot the CI server.
Pipeline as Code describes a set of features that allow Jenkins users to define pipelined job processes with code, stored and versioned in a source repository. These features allow Jenkins to discover, manage, and run jobs for multiple source repositories and branches — eliminating the need for manual job creation and management.
Below mentioned ways help you to start the node agent –
- Command-line – For this, the client needs the executable agent.jar file. It helps to launch the process on the client to communicate with the Jenkins master to run build jobs.
- Browser – This file launches a new process on the client machine to run jobs.
Ansible is an agent-less configuration management and orchestration tool. In Ansible, the configuration modules will be called as Playbooks. Like other tools, Ansible will be used to cloud provision.
No. Executors is number of parallel jobs, based on requirement If we required, jenkins should run at max 5 parallel jobs we will provided the number at No. executors.
Manage Jenkins → Configure system → Number of parallel jobs: 5
Plugins can be downloaded from plugins.jenkins.io site
Yes, it is possible by using ‘Job Import’ plugin. We will exchange the job between two jenkins. We required providing the source instance (Jenkins) URL. We will import a particular job and all the jobs and also views.
‘Deploy to Container Plugin’ is required to deploy a.war file into application server.
‘Rebuild plug-in’ will allow the user to rebuild a parametrized build without entering the parameters again.
Using ‘slave.jar’ file in slave system master system will communicate to slave system. This file must be present in slave to communicate with.
Go to job configuration tab –> under ‘General’ section enable ‘Restrict where this project will be run’ then we will provide the lable name of the node.
Go to –>’Manage jenkins’ –> ‘configure system’ –> at ‘Labels’ mention the node system label.
It can check the code in SCM tool twice in between the builds, if the value is 2.
Stage – Containing a sequence of one or more stage directives, the stages section is where the bulk of the “work” will be described by a Pipeline can be located. At a minimum it will be recommended which stages will contain at least one stage directive for each discrete part of the continuous delivery process, like Build, Test, and Deploy.
Stages in Declarative Pipeline will declare a number of nested stages within them, which will be executed in parallel. A stage should have only one of either steps or parallel. The nested stages cannot have further parallel stages themselves, otherwise behave the same as any other stage. Any stage which contains parallel cannot have agent or tools, since those are not relevant without steps.
Matrix-based security is one of the approval techniques accessible for verifying Jenkins. It enables you to give explicit consent to clients and gatherings. The accessible authorizations are recorded beneath with their portrayals and are additionally accessible by floating over the consent heading in the Jenkins UI.
Snippet Generator is a utility for creating bits of code for individual steps provided by the plugin and it is dynamically populated with a list of the steps available to the Jenkins instance.
Want to test this skill? Checkout Adaface assessments
Ansible & Jenkins Online Test
Shortlist the best talent today
(100% free to get started, no credit card required)