CJE BENCHMARK EXAM 1, 2 & 3 EXAM
QUESTIONS AND CORRECT ANSWERS
LATEST UPDATE
1. In a Declarative Pipeline, which directive is used to specify that a stage should only run if a
specific branch is being built?
A. when
B. trigger
C. condition
D. unless
Answer: A
Conceptual Explanation: The ‘when’ directive allows the Pipeline to determine whether a
stage should be executed depending on given conditions, such as ‘branch’, ‘environment’, or
‘expression’.
2. What is the primary purpose of the ‘Fingerprint’ feature in Jenkins?
A. To verify the identity of the user who started the build
B. To encrypt the build logs for security compliance
C. To track the usage of artifacts across different projects and builds
D. To sign the Jenkinsfile to prevent unauthorized changes
,Answer: C
Conceptual Explanation: Fingerprinting in Jenkins is used to track which version of an
artifact is used by which version of a build, facilitating dependency tracking across jobs.
3. Which file in the JENKINS_HOME directory contains the primary configuration for the
Jenkins instance?
A. master.xml
B. config.xml
C. hudson.model.UpdateCenter.xml
D. jenkins.conf
Answer: B
Conceptual Explanation: The ‘config.xml’ file located in the JENKINS_HOME root contains
the main system configuration settings for the Jenkins controller.
4. When using a Shared Library, where should the global variables (custom steps) be defined
within the library structure?
A. src/org/library
B. resources/steps
C. groovy/functions
D. vars/
Answer: D
, Conceptual Explanation: In Jenkins Shared Libraries, global variables and custom steps
that are accessible in Pipelines are defined as .groovy files in the ‘vars/’ directory.
5. Which security realm allows Jenkins to delegate authentication to a Unix-compatible
operating system?
A. Delegate to servlet container
B. Unix user/group database
C. LDAP
D. Jenkins’ own user database
Answer: B
Conceptual Explanation: The ‘Unix user/group database’ realm allows Jenkins to use the
host’s underlying PAM (Pluggable Authentication Modules) for user authentication.
6. In a Jenkins Pipeline, what is the difference between ‘stash’ and ‘archiveArtifacts’?
A. Stash is for long-term storage, while archiveArtifacts is temporary
B. There is no difference; they are aliases for the same function
C. Stash is used to share files between stages on different agents, while archiveArtifacts is
for post-build results
D. Stash only works on the master node, while archiveArtifacts works on agents
Answer: C
QUESTIONS AND CORRECT ANSWERS
LATEST UPDATE
1. In a Declarative Pipeline, which directive is used to specify that a stage should only run if a
specific branch is being built?
A. when
B. trigger
C. condition
D. unless
Answer: A
Conceptual Explanation: The ‘when’ directive allows the Pipeline to determine whether a
stage should be executed depending on given conditions, such as ‘branch’, ‘environment’, or
‘expression’.
2. What is the primary purpose of the ‘Fingerprint’ feature in Jenkins?
A. To verify the identity of the user who started the build
B. To encrypt the build logs for security compliance
C. To track the usage of artifacts across different projects and builds
D. To sign the Jenkinsfile to prevent unauthorized changes
,Answer: C
Conceptual Explanation: Fingerprinting in Jenkins is used to track which version of an
artifact is used by which version of a build, facilitating dependency tracking across jobs.
3. Which file in the JENKINS_HOME directory contains the primary configuration for the
Jenkins instance?
A. master.xml
B. config.xml
C. hudson.model.UpdateCenter.xml
D. jenkins.conf
Answer: B
Conceptual Explanation: The ‘config.xml’ file located in the JENKINS_HOME root contains
the main system configuration settings for the Jenkins controller.
4. When using a Shared Library, where should the global variables (custom steps) be defined
within the library structure?
A. src/org/library
B. resources/steps
C. groovy/functions
D. vars/
Answer: D
, Conceptual Explanation: In Jenkins Shared Libraries, global variables and custom steps
that are accessible in Pipelines are defined as .groovy files in the ‘vars/’ directory.
5. Which security realm allows Jenkins to delegate authentication to a Unix-compatible
operating system?
A. Delegate to servlet container
B. Unix user/group database
C. LDAP
D. Jenkins’ own user database
Answer: B
Conceptual Explanation: The ‘Unix user/group database’ realm allows Jenkins to use the
host’s underlying PAM (Pluggable Authentication Modules) for user authentication.
6. In a Jenkins Pipeline, what is the difference between ‘stash’ and ‘archiveArtifacts’?
A. Stash is for long-term storage, while archiveArtifacts is temporary
B. There is no difference; they are aliases for the same function
C. Stash is used to share files between stages on different agents, while archiveArtifacts is
for post-build results
D. Stash only works on the master node, while archiveArtifacts works on agents
Answer: C