Jenkins Test Series
Jenkins Test Series
Jenkins Test Series
A. Multibranch Pipeline
B. Freestyle Job
C. Pipeline Job
D. All of these
11.Which plugin provides a robust solution for performing code quality analysis
in Jenkins?
A. Check style Plugin
B. SonarQube Plugin
C. PMD Plugin
D. Find Bugs Plugin
12. What is a common issue when setting up Jenkins Agents via SSH, and how
can it be resolved?
A. Firewall blocking the SSH port; resolve by opening the port in the firewall
B. Incorrect URL format; resolve by using a valid URL format
C. Jenkins version mismatch; resolve by upgrading Jenkins
D. Disk space limitations; resolve by adding more storage
13.How can you restrict a specific job to run only on a particular Jenkins Agent?
A. By using labels and specifying the label in the job configuration
B. By modifying the Jenkins core configuration
C. By setting environment variables
D. By using a special plugin
14. How do you set environment variables in a Jenkins declarative pipeline?
A. env {VAR_NAME = 'value’}
B. environment {VAR_NAME = 'value’}
C. set {VAR_NAME = 'value’}
D. export {VAR_NAME = 'value’}
15. How can you ensure a Jenkins job is triggered by changes in a GitHub
repository?
A. Using GitHub webhooks
B. Using a scheduled cron job
C. Manually triggering the build
D. Using a polling mechanism
16. Which keyword is used to define a stage in declarative pipeline?
A. Stage
B. Pipe
C. Post
D. Shell
17. "script" block in declarative pipeline is used to?
A. Define Parameters
B. Execute Shell script
C. Execute sub-pipeline
D. Specify job name
18.What is the recommended practice for storing Jenkins files?
A. Local
B. GitHub
C. S3 any cloud storage
D. All of these
19. Which of the following is not a core component of Jenkins?
A. Jenkins Master
B. Jenkins Slave
C. Jenkins Node
D. Jenkins Client
20. What is the Jenkins Global Tool Configuration?
A. A feature that allows users to configure global settings in Jenkins
B. A plugin that provides additional functionality to Jenkins
C. A tool used to manage the installation of software on Jenkins nodes
D. A tool used to manage the distribution of work to Jenkins slaves
21. What is the purpose of the Jenkins Build History?
A. To provide a log of the builds that have been performed in Jenkins
B. To manage the configuration of Jenkins
C. To generate reports on the status of Jenkins jobs
D. To enable Jenkins to communicate with external systems
22. What could be the reason that my job is executing on the master itself
instead of on the nodes, even after configuring Jenkins master and nodes?
A. Labels mismatch
B. less resource available on node
C. Connection issues
D. All of these
23. How to avoid scheduling job on master if node labels are not match with
pipeline labels.
A. Number of executors of the master node is set to ‘0’
B. Increase the resource of nodes
C. Jenkins will not schedule a job on master by default
D. All of these
24. After configuring my master and node setup, what will be the status of the
job if I try to run a pipeline with different labels?
A. Execute on master
B. Job on pending state if master having any restrictions
C. Job always pending
D. A and B
25. What does the "Matrix-based security" in Jenkins allow you to do?
A. Enforce complex password policies
B. Grant different permissions to different users and groups
C. Integrate with third-party authentication systems
D. Enable two-factor authentication
3.Your team uses Jenkins for continuous integration, and you want to ensure
that the builds are triggered only when changes are made to specific directories
within the repository.
How would you configure your Jenkins job or pipeline to achieve this?
4. You have a Jenkins pipeline that builds a large codebase. The build process
takes a long time to complete,
and you want to optimize it to reduce the build time. What strategies or
techniques could you implement to achieve faster builds?