CJE BENCHMARK EXAM STUDY GUIDE
QUESTIONS AND CORRECT ANSWERS
LATEST UPDATE
1. In a Jenkins Declarative Pipeline, which directive is used to specify that a stage should only
execute if a certain condition is met?
A. trigger
B. condition
C. when
D. if
Answer: C
Conceptual Explanation: The ‘when’ directive allows the Pipeline to determine whether
that stage should be executed based on the specified conditions.
2. Which of the following is the primary advantage of using a Multibranch Pipeline over a
standard Pipeline project?
A. It allows for faster execution of builds.
B. It eliminates the need for a Jenkinsfile in the repository.
C. It supports Scripted Pipeline syntax while standard projects do not.
,D. It automatically creates a Pipeline for each branch in a repository that contains a
Jenkinsfile.
Answer: D
Conceptual Explanation: Multibranch Pipelines automatically detect, manage, and create
jobs for new branches in source control that contain a Jenkinsfile.
3. What is the function of the ‘agent’ directive in a Declarative Pipeline?
A. It defines the SCM credentials.
B. It triggers a build on a remote Jenkins master.
C. It specifies where the entire Pipeline or a specific stage will execute.
D. It defines the email recipients for build notifications.
Answer: C
Conceptual Explanation: The ‘agent’ directive specifies the execution environment for the
Pipeline or stage, such as a specific node, Docker container, or any available agent.
4. Which Jenkins security setting is recommended to prevent users from seeing projects they
do not have access to?
A. Matrix-based security
B. Project-based Matrix Authorization Strategy
C. Role-based Authorization Strategy
D. Legacy Mode
, Answer: B
Conceptual Explanation: Project-based Matrix Authorization Strategy allows fine-grained
control over permissions per project, ensuring users only see what they are authorized for.
5. In the context of Jenkins Shared Libraries, what is the purpose of the ‘vars’ directory?
A. To store static resource files.
B. To store Groovy class definitions (src directory).
C. To define global variables and custom steps accessible in the Pipeline.
D. To store configuration files for the Jenkins master.
Answer: C
Conceptual Explanation: The ‘vars’ directory in a Shared Library holds script files that
define global variables and functions that become custom steps in the Pipeline syntax.
6. What does the ‘stash’ step do in a Jenkins Pipeline?
A. It saves a set of files for use later in the same build, potentially on a different node.
B. It permanently archives files for long-term storage.
C. It pushes code changes to a Git repository.
D. It creates a backup of the Jenkins configuration.
Answer: A
QUESTIONS AND CORRECT ANSWERS
LATEST UPDATE
1. In a Jenkins Declarative Pipeline, which directive is used to specify that a stage should only
execute if a certain condition is met?
A. trigger
B. condition
C. when
D. if
Answer: C
Conceptual Explanation: The ‘when’ directive allows the Pipeline to determine whether
that stage should be executed based on the specified conditions.
2. Which of the following is the primary advantage of using a Multibranch Pipeline over a
standard Pipeline project?
A. It allows for faster execution of builds.
B. It eliminates the need for a Jenkinsfile in the repository.
C. It supports Scripted Pipeline syntax while standard projects do not.
,D. It automatically creates a Pipeline for each branch in a repository that contains a
Jenkinsfile.
Answer: D
Conceptual Explanation: Multibranch Pipelines automatically detect, manage, and create
jobs for new branches in source control that contain a Jenkinsfile.
3. What is the function of the ‘agent’ directive in a Declarative Pipeline?
A. It defines the SCM credentials.
B. It triggers a build on a remote Jenkins master.
C. It specifies where the entire Pipeline or a specific stage will execute.
D. It defines the email recipients for build notifications.
Answer: C
Conceptual Explanation: The ‘agent’ directive specifies the execution environment for the
Pipeline or stage, such as a specific node, Docker container, or any available agent.
4. Which Jenkins security setting is recommended to prevent users from seeing projects they
do not have access to?
A. Matrix-based security
B. Project-based Matrix Authorization Strategy
C. Role-based Authorization Strategy
D. Legacy Mode
, Answer: B
Conceptual Explanation: Project-based Matrix Authorization Strategy allows fine-grained
control over permissions per project, ensuring users only see what they are authorized for.
5. In the context of Jenkins Shared Libraries, what is the purpose of the ‘vars’ directory?
A. To store static resource files.
B. To store Groovy class definitions (src directory).
C. To define global variables and custom steps accessible in the Pipeline.
D. To store configuration files for the Jenkins master.
Answer: C
Conceptual Explanation: The ‘vars’ directory in a Shared Library holds script files that
define global variables and functions that become custom steps in the Pipeline syntax.
6. What does the ‘stash’ step do in a Jenkins Pipeline?
A. It saves a set of files for use later in the same build, potentially on a different node.
B. It permanently archives files for long-term storage.
C. It pushes code changes to a Git repository.
D. It creates a backup of the Jenkins configuration.
Answer: A