Limited-Time Offer: Enjoy 50% Savings! Coupon code: 50OFF Use it at checkout
Skip to content

Free CloudBees Certified Jenkins Engineer (CJE) CJE Exam Questions

Last updated: · 13 practice questions with answers and explanations

Page: 1 / 13 Total 186 questions

Want more questions? Get Premium Access.

Question 1

New Single answer

Topic: Key CI/CD/Jenkins Concepts

Skill tested: Distinguishes continuous delivery from continuous deployment using release approval gates.

A financial services team has automated compilation, unit and integration tests, packaging, and deployment to a production-like environment. After those stages pass, an authorized release manager must review the evidence and approve production deployment; the organization does not permit production releases to happen automatically. Leadership wants to describe the delivery model accurately and preserve that control. Which characterization best fits the process?

Correct Answer: A. Continuous delivery, because the software remains deployable while production release is gated by approval.
Explanation:

Continuous delivery automates the path to a release-ready state while allowing a person or policy gate to decide when production deployment occurs. The approval requirement therefore fits continuous delivery, not continuous deployment. Continuous integration focuses on frequently integrating changes and validating them; it does not by itself describe the complete release path in this scenario. Continuous deployment would release qualifying changes to production automatically, which the organization explicitly disallows. A manual approval gate does not invalidate a delivery pipeline.

Question 2

New Single answer

Topic: Key CI/CD/Jenkins Concepts

Skill tested: Selects SCM checkout behavior that preserves changelog context while avoiding unnecessary full clones.

A Jenkins team runs frequent builds against a large Git repository. Builds must report changes since the previous build so reviewers can correlate failures with commits, but the team also wants to reduce checkout time. The repository history is available to Jenkins, and no process requires every build to create an independent full clone. Which approach best meets both requirements?

Correct Answer: B. Use the Git plugin's incremental workspace update and retain changelog calculation.
Explanation:

An incremental Git workspace update can reuse the existing checkout rather than repeatedly cloning all repository data, while Jenkins can still calculate changes for the build changelog. This supports both the performance goal and change traceability. A clean checkout discards reusable workspace state and disabling changelogs removes the required context. Console logs are not a reliable substitute for SCM change records. A history-limited shallow checkout may not contain the commits needed to compare against the prior build, so it does not reliably meet the stated changelog requirement.

Question 3

New Multiple answers

Topic: Key CI/CD/Jenkins Concepts

Skill tested: Applies Jenkins build triggers and artifact management to create traceable release inputs.

A product group wants each successful main-branch build to produce a versioned package that a later release job can deploy without rebuilding the source. The release job should run only after the package-producing job succeeds, and teams need to identify the exact source revision associated with each package. Which TWO design choices best meet these requirements? Select TWO.

Correct Answer: A. Archive the package as a build artifact and retain the associated build metadata and SCM revision.; B. Trigger the release job from the package job only after a successful completion, passing or retrieving the published artifact.
Explanation:

Archiving or otherwise publishing the package as a build output preserves a deployable input tied to the build's SCM revision. Triggering the downstream release only after successful completion establishes the required dependency and allows the release process to consume that exact output. Rebuilding in the release job can produce a different binary and breaks binary reuse. A workspace is not a dependable artifact-retention mechanism and may be cleaned or reused. Periodic discovery of the newest package does not enforce that its producing build succeeded or preserve the requested job-to-job relationship.

Question 4

New Single answer

Topic: Key CI/CD/Jenkins Concepts

Skill tested: Chooses automated test stages that provide fast feedback before slower acceptance verification.

A team has a Jenkins pipeline for a service with thousands of unit tests and a smaller suite of end-to-end acceptance tests that requires a deployed test environment. Recent changes often fail basic logic checks, but the acceptance suite is expensive and takes much longer. The team wants failures detected as early as practical without dropping acceptance coverage. Which stage ordering is most appropriate?

Correct Answer: D. Run unit tests first, then deploy to the test environment and run acceptance tests before promoting the release.
Explanation:

Fast, focused unit tests should generally run before the more costly environment-dependent acceptance suite. This gives developers early feedback on basic behavior and avoids deploying changes that already fail low-level checks. Acceptance tests still provide valuable verification of integrated behavior, so they remain later in the pipeline before promotion. Running acceptance tests first wastes environment time on failures that unit tests could catch. End-to-end tests do not make unit tests redundant, and testing after production deployment reverses the intended risk-control sequence.

Question 5

New Single answer

Topic: Jenkins usage (features and functionality)

Skill tested: Configures multibranch Pipeline discovery to build and report status for repository branches.

A team stores a Jenkinsfile in each feature branch and wants Jenkins to discover new branches, run the branch-specific Pipeline, and publish build status back to the source repository. Developers should not need an administrator to create a separate Jenkins job for every branch. Which setup is the most appropriate?

Correct Answer: A. Create a Multibranch Pipeline job with an appropriate branch source and configure the SCM integration credentials and status notifications.
Explanation:

A Multibranch Pipeline uses a branch source to discover eligible branches and runs the Jenkinsfile found in each branch, avoiding manual job creation as branches appear. Configuring the source connection and credentials enables repository integration; status reporting must also be configured through the relevant SCM integration. A single Freestyle job requires manual branch changes and does not naturally execute each branch's Jenkinsfile. A manually maintained matrix axis creates the same administrative burden. Reading Jenkinsfiles from agent workspaces is neither branch discovery nor a reliable SCM-backed configuration.

Question 6

New Multiple answers

Topic: Jenkins usage (features and functionality)

Skill tested: Configures test-result publication and quality gates for reliable Jenkins build status.

A Java team runs tests with a build tool in a Jenkins Pipeline. Test execution completes, but failures are visible only in console output, and downstream promotion sometimes proceeds despite failed tests. The team needs Jenkins to display test trends and mark the build unsuccessful when tests fail, while still preserving reports when the test command exits nonzero. Which TWO actions are most appropriate? Select TWO.

Correct Answer: A. Publish the generated JUnit-format XML with the Pipeline's JUnit test-result publishing step, including in a post-build reporting path.; B. Configure the test command or Pipeline so a failing test result makes the build fail, while allowing the report-publishing step to run afterward.
Explanation:

Jenkins can parse JUnit XML through its test-result publishing step, making results and trends visible rather than leaving them buried in console output. Report publication should run even when the test command fails, commonly by placing it in an appropriate post-build action. The build must still reflect failed tests so downstream promotion is blocked. Ignoring exit status can promote broken code, and merely finding an XML file does not prove success. Logs alone do not provide structured test reporting; agent availability is unrelated to test outcome.

Question 7

New Single answer

Topic: Jenkins usage (features and functionality)

Skill tested: Chooses a Jenkins SCM webhook trigger to reduce latency and avoid frequent repository polling.

A repository provider supports authenticated webhook delivery to Jenkins. A team needs branch builds to start shortly after a push, but its Jenkins controller has many jobs and frequent SCM polling is creating unnecessary request load. Firewall rules allow the provider to reach a dedicated Jenkins endpoint. Which approach best addresses the requirement?

Correct Answer: B. Configure repository webhooks to notify Jenkins of pushes and enable the corresponding Jenkins SCM event trigger.
Explanation:

A webhook is a push-based notification: the repository provider notifies Jenkins when an event occurs, allowing a build to start without every job repeatedly polling SCM. This reduces polling load and improves response time when the endpoint and event integration are configured correctly. More frequent polling increases requests rather than reducing them. Manual builds do not meet the timely automation requirement. A scheduled scan is still pull-based and can start unnecessary work while delaying detection until the next schedule.

Question 8

New Multiple answers

Topic: Jenkins usage (features and functionality)

Skill tested: Uses Jenkins agents and parallel execution to improve throughput while monitoring agent availability.

A controller coordinates builds for several teams. Compilation jobs queue during peak hours, while the controller also handles the web interface and job scheduling. The organization has spare Linux servers that can run builds, but wants to keep build execution off the controller and retain visibility into executor availability. Which TWO actions best satisfy these goals? Select TWO.

Correct Answer: C. Connect the Linux servers as Jenkins agents, assign suitable labels and executors, and direct eligible jobs to those labels.; E. Monitor agent online status and executor utilization, and configure jobs or operations to respond to unavailable capacity.
Explanation:

Jenkins agents provide distributed build capacity, and labels let jobs request compatible nodes rather than consuming controller resources. Monitoring agent connectivity and executor utilization helps operators diagnose queues and unavailable capacity. Increasing controller executors contradicts the requirement to keep builds off the controller and may compete with controller services. Unmanaged background processes bypass Jenkins scheduling, logging, and lifecycle management. Disabling the queue cannot create capacity; Jenkins must wait when no suitable executor is available.

Question 9

New Single answer

Topic: Jenkins usage (features and functionality)

Skill tested: Uses Jenkins credentials binding to protect secrets passed to build steps.

A deployment Pipeline needs a repository password for an authenticated command. The value must not be stored in the Jenkinsfile or printed in ordinary console output, and only the deployment job should use it. The Jenkins instance already has credential storage and access controls. Which implementation is most appropriate?

Correct Answer: A. Store the password as a Jenkins credential, restrict its use through job and credential permissions, and bind it only for the required Pipeline step.
Explanation:

Jenkins credentials storage avoids embedding the secret in source-controlled Pipeline code, while credentials binding limits exposure to the step that needs the value and supports masking in console output. Access should be restricted so unrelated jobs or users cannot use the credential. A hard-coded value remains in source history. Plain parameters can expose secrets in build metadata or user interfaces. A workspace file creates additional exposure and cleanup risks rather than providing controlled secret handling.

Question 10

New Single answer

Topic: Building Continuous Delivery (CD) Pipelines

Skill tested: Uses Pipeline stages and approval gates to model a controlled production release path.

A release team has a Jenkins Pipeline that builds, tests, and deploys a candidate to a staging environment. Compliance requires a named operator to authorize each production release, and the team wants the pipeline's stage history to show where the release is waiting. Production credentials must not be exposed to the staging steps. Which design best meets the requirements?

Correct Answer: C. Use a Pipeline input approval step before production deployment, and scope production credentials to the deployment stage.
Explanation:

A Pipeline input step can pause at a defined gate for an authorized person to approve, and stage structure provides useful execution history around that wait. Keeping production credentials scoped to the production deployment stage limits their exposure to earlier build and staging work. An approval after deployment cannot control whether production is released. Pausing the controller is not a pipeline gate and global credentials broaden exposure. Unrelated jobs and a shared workspace do not provide a dependable, clear approval path.

Question 11

New Multiple answers

Topic: Building Continuous Delivery (CD) Pipelines

Skill tested: Implements upstream and downstream job relationships with success-conditioned artifact handoff.

A legacy Jenkins process uses separate jobs for compilation, integration testing, and packaging. The packaging job must run only after integration tests succeed and must consume the exact binary tested by the previous job. Teams want to retain the existing job boundaries for now and avoid copying files through an agent workspace that may be reused. Which TWO actions best support this flow? Select TWO.

Correct Answer: B. Configure an upstream/downstream trigger so packaging starts only after successful integration testing and retrieves the associated binary.; D. Publish the tested binary from the upstream job as a retained artifact or through a configured artifact repository.
Explanation:

The tested binary must be made available through a reliable artifact handoff, such as a retained Jenkins artifact or an artifact repository. A success-conditioned downstream trigger preserves the required job dependency, and the downstream job can retrieve the artifact associated with that upstream run. Triggering after failures violates the release condition. Rebuilding from current source may produce a different binary than the one tested. Reusing a mutable agent workspace does not reliably identify or preserve the exact upstream build output.

Question 12

New Single answer

Topic: CD-as-Code Best Practices

Skill tested: Designs Jenkins controller-agent topology with replaceable agents and appropriate connection direction.

An organization runs Jenkins in a restricted network where inbound connections to build hosts are blocked, but agents can initiate outbound connections to the controller. Build hosts are recreated regularly from standardized images, so local agent state must not be required for correctness. The controller should coordinate work rather than compile it. Which architecture is the best fit?

Correct Answer: B. Use replaceable agents that initiate an approved outbound connection to the controller, and keep required tools and build inputs reproducible on those agents.
Explanation:

Agents that initiate connections to the controller fit the stated firewall direction, while replaceable agents align with the requirement that hosts can be recreated without losing correctness. Tool installations and build inputs should be provisioned reproducibly rather than relying on undocumented local state. Controller-hosted builds violate the separation requirement. Controller-initiated SSH cannot work under the stated inbound restriction. Persistent, uniquely configured agents make builds fragile and contradict the replaceability constraint.

Question 13

New Single answer

Topic: CD-as-Code Best Practices

Skill tested: Applies Jenkins high-availability principles without treating controller replication as shared-state failover.

A company needs to reduce Jenkins service interruption after controller-host failure. Its current Jenkins installation stores job configuration, credentials, plugins, and build records on the controller's persistent storage. The team is considering simply starting a second controller from the same files at the same time. They require a supported operational design that avoids concurrent controllers corrupting shared state and keeps recovery procedures testable. What is the best approach?

Correct Answer: D. Create an active-passive recovery design with protected, consistent Jenkins home backups or replicated storage, and test restoration and failover procedures.
Explanation:

Jenkins controller state includes configuration and other data held in Jenkins home; a practical recovery plan protects that state and defines how a standby controller is restored or activated. Regularly testing backups and failover procedures verifies that recovery works. Running two controllers concurrently against the same Jenkins home is not a safe way to obtain active-active operation and risks conflicting writes. Workspaces alone omit critical controller data. A load balancer cannot make independent controller state consistent or provide transparent shared job state.