Notice: Due to an ongoing migration of our storage and publishing system, material requested since last month will not be uploaded for the time being, and new requests are paused. All existing notes remain available.
In the Jenkins Master/Agent architecture, what is the primary role of the Jenkins Master?
Not quite. Try another option.
Answer: To schedule build jobs, dispatch them to agents, and monitor the results
The Jenkins Master acts as the control plane. It handles scheduling jobs, dispatching builds to the agents for actual execution, recording results, and presenting the UI.
Question 2 of 60 · Plugins management · Easy
What is the primary purpose of plugins in Jenkins?
Not quite. Try another option.
Answer: To extend Jenkins functionality and integrate with other tools
Plugins are modular extensions that provide Jenkins with capabilities to integrate with external tools (like Git, Docker, Maven) and add new features.
Question 3 of 60 · Jenkinsfile structure · Easy
What is a Jenkinsfile?
Not quite. Try another option.
Answer: A text file that contains the definition of a Jenkins Pipeline and is checked into source control
A Jenkinsfile is a text file containing the definition of a Jenkins Pipeline, allowing the pipeline to be version-controlled alongside the application code.
Question 4 of 60 · Freestyle vs Pipeline jobs · Easy
What is a major advantage of Jenkins Pipeline jobs over Freestyle jobs?
Not quite. Try another option.
Answer: Pipeline jobs allow the build process to be defined as code (Pipeline-as-Code)
Unlike Freestyle jobs which are configured via the UI, Pipeline jobs use a Jenkinsfile to define the entire build process as code, enabling version control and reusability.
Question 5 of 60 · Declarative pipeline syntax · Easy
Which keyword is used to start a Declarative Jenkins Pipeline block?
Not quite. Try another option.
Answer: pipeline {
Declarative pipelines must be enclosed within a pipeline { ... } block at the top level.
Question 6 of 60 · Pipeline Stages: Checkout code from Git · Easy
What happens during the 'Checkout' stage of a Jenkins CI/CD pipeline?
Not quite. Try another option.
Answer: Source code is fetched from a version control system like Git
The 'Checkout' stage is typically the first step in a pipeline, where Jenkins retrieves the latest source code from a repository (e.g., Git) to build and test it.
Question 7 of 60 · Managing artifacts · Easy
In Jenkins, what is an 'artifact'?
Not quite. Try another option.
Answer: A deployable file or package (like a .jar or .zip) produced during a build
Artifacts are the output files generated by a successful build process, such as compiled binaries, JAR files, or Docker images, which are saved for later deployment.
Question 8 of 60 · Jenkins multi-branch pipelines · Easy
What is the main feature of a Jenkins Multi-branch Pipeline?
Not quite. Try another option.
Answer: It automatically discovers branches in a repository and creates a pipeline for each branch containing a Jenkinsfile
Multi-branch pipelines automatically detect branches and pull requests in a repository and run a pipeline for any branch that contains a Jenkinsfile.
Why is running Docker inside Jenkins agents beneficial?
Not quite. Try another option.
Answer: It allows builds to run in isolated, clean, and consistent containerized environments
Using Docker in agents ensures that the build environment is consistent, isolated, and doesn't require pre-installing specific build tools directly on the host agent machine.
Question 10 of 60 · Publishing images to Docker Hub/GHCR · Easy
Which of the following describes the process of sending a newly built Docker image to Docker Hub?
Not quite. Try another option.
Answer: Docker push
The docker push command is used in pipelines to publish or upload a built local Docker image to a remote registry like Docker Hub or GHCR.
Which build trigger mechanism is more efficient and immediate: PollSCM or Webhooks?
Not quite. Try another option.
Answer: Webhooks, because Git actively notifies Jenkins only when a change occurs
Webhooks are more efficient because the source code repository pushes a notification to Jenkins immediately when code is committed, unlike PollSCM where Jenkins has to periodically check for changes.
Question 12 of 60 · Global tool configuration · Easy
Where in Jenkins do you configure the paths for tools like JDK, Maven, and Git so that they can be used globally across jobs?
Not quite. Try another option.
Answer: Manage Jenkins -> Global Tool Configuration
The 'Global Tool Configuration' menu under 'Manage Jenkins' is used to define the installation paths and versions of essential tools like Maven, Git, and Java.
Answer: A machine or container that connects to the Master and executes the actual build tasks
A Jenkins Agent is a worker node (machine or container) assigned by the Jenkins Master to execute the steps of a build job.
Question 14 of 60 · Post actions · Easy
In a Declarative Pipeline, what is the purpose of the post block?
Not quite. Try another option.
Answer: To define actions to take after the pipeline or a specific stage completes, such as sending emails or cleaning up
The post section defines steps that run at the end of the pipeline or a stage, often used for notifications, archiving artifacts, or cleaning up workspaces.
Question 15 of 60 · Running Maven builds in pipelines · Easy
Which of the following commands is typically used in a Jenkins pipeline to compile, test, and package a Java application using Maven?
Not quite. Try another option.
Answer: mvn clean install
The mvn clean install command tells Maven to clean previous build outputs and then compile, test, and package the application into an artifact (like a JAR).
Question 16 of 60 · Backup & restore · Easy
Which directory contains all Jenkins configurations, job definitions, and logs, and is the primary target for a Jenkins backup?
Not quite. Try another option.
Answer: JENKINS_HOME
The JENKINS_HOME directory stores all Jenkins data, including configurations, plugin data, and job workspaces, making it critical to backup.
Question 17 of 60 · Pipeline libraries · Easy
What is the primary benefit of using Jenkins Shared Libraries?
Not quite. Try another option.
Answer: It allows developers to share reusable pipeline code across multiple Jenkinsfiles
Shared Libraries allow teams to extract common pipeline logic (like deployment scripts or notifications) into a centralized repository, promoting code reuse across many Jenkins jobs.
Question 18 of 60 · Parameters · Easy
Why would you use parameters in a Jenkins pipeline?
Not quite. Try another option.
Answer: To allow users to pass dynamic inputs (like branch names or environment tags) when triggering a build
Parameters make pipelines interactive and flexible by prompting users to supply inputs (such as choosing between 'dev' or 'prod' environments) before the job runs.
Question 19 of 60 · Code coverage & test reports · Easy
In a Jenkins pipeline, what is the purpose of test report plugins (like JUnit)?
Not quite. Try another option.
Answer: To visualize test results and track the number of passed/failed tests over time
Test report plugins parse test output files (like JUnit XMLs) and generate readable graphs and dashboards in Jenkins to show test success/failure trends.
Question 20 of 60 · Jenkins agents (SSH/SFTP/Container-based) · Easy
How does the Jenkins Master typically communicate with an SSH-based agent?
Not quite. Try another option.
Answer: By establishing a secure SSH connection to the agent machine using credentials
Jenkins connects to remote Unix/Linux agents via SSH by authenticating with a username and SSH key/password to execute commands and scripts.
Question 21 of 60 · Jenkins Foundations: Jenkins architecture (Master/Agent model) · Medium
In a Jenkins Master/Agent architecture, what happens to currently executing builds on an agent if the Jenkins Master node suddenly crashes?
Not quite. Try another option.
Answer: The agent continues executing the build but the results and logs cannot be reported back until the Master recovers.
Jenkins agents process jobs independently once dispatched. If the Master goes offline, the agent continues the execution, but the logs and final status cannot be synchronized until the Master reconnects.
Question 22 of 60 · Jenkins Pipelines: Freestyle vs Pipeline jobs · Medium
Which of the following is a primary advantage of using a Jenkins Pipeline job over a Freestyle job for a CI/CD workflow?
Not quite. Try another option.
Answer: Pipelines allow the build configuration to be version-controlled in the source code repository as a Jenkinsfile.
The defining feature of Jenkins Pipelines (Pipeline as Code) is the ability to write the build process in a Jenkinsfile which is stored and versioned alongside the application code, unlike Freestyle jobs which are configured via the UI.
Question 23 of 60 · Jenkins Pipelines: Declarative pipeline syntax · Medium
In a Declarative Pipeline, which directive is used to control the execution of a stage based on specific conditions, such as the branch name?
Not quite. Try another option.
Answer: when { ... }
The when directive in a Declarative Pipeline allows the pipeline to determine whether a given stage should be executed depending on the defined condition, such as when { branch 'main' }.
Question 24 of 60 · Pipeline Stages: Managing artifacts · Medium
Which pipeline step is used to preserve a generated binary file (e.g., a .jar file) so that it can be downloaded directly from the Jenkins build results page?
The archiveArtifacts step tells Jenkins to save specified files from the workspace to the Jenkins master, making them available as artifacts on the build page. stash is only used to pass files between nodes during a single pipeline run.
Question 25 of 60 · Jenkins CI/CD Deployment Flows: Triggering builds (pollSCM, webhook) · Medium
Why is it generally recommended to use Webhooks over pollSCM for triggering Jenkins builds from a Git repository?
Not quite. Try another option.
Answer: pollSCM creates unnecessary overhead and API calls by constantly checking for changes, whereas Webhooks push an event to Jenkins only when a change occurs.
Polling the SCM means Jenkins repeatedly queries the repository on a schedule, wasting resources. Webhooks are event-driven, instantly notifying Jenkins when a push or merge occurs, which is much more efficient.
Question 26 of 60 · Docker and Jenkins Integration: Docker inside Jenkins agents · Medium
When configuring a Jenkins agent to build Docker images, what is the 'Docker outside of Docker' (DooD) approach?
Not quite. Try another option.
Answer: Mounting the host machine's /var/run/docker.sock into the Jenkins agent container so it uses the host's Docker daemon.
DooD involves mapping the host's Docker socket into the container. This allows the Jenkins agent container to spawn sibling containers on the host machine, avoiding the complexities and security risks of running a nested Docker daemon (DinD).
Question 27 of 60 · Jenkins Pipelines: Parameters, environment variables · Medium
How do you correctly reference a Jenkins environment variable named BUILD_NUMBER within a sh step in a Declarative Pipeline?
Not quite. Try another option.
Answer: sh "echo The build number is ${env.BUILD_NUMBER}"
To inject Groovy variables (like ${env.BUILD_NUMBER}) into a shell step, you must use double quotes. Single quotes in Groovy represent a literal string, which will not interpolate the variable.
Question 28 of 60 · Jenkins and Maven: Global tool configuration · Medium
If an underlying Jenkins agent does not have Maven installed on its OS, how can a pipeline still execute mvn clean install successfully?
Not quite. Try another option.
Answer: By configuring Maven in the 'Global Tool Configuration' and referencing it using the tools directive in the pipeline.
Jenkins allows administrators to define tools (like Maven, JDK, Node) in 'Global Tool Configuration'. Using the tools { maven 'maven-version' } directive tells the agent to automatically download and configure the specified tool before running steps.
Question 29 of 60 · Docker and Jenkins Integration: Publishing images to Docker Hub/GHCR · Medium
What is the most secure way to authenticate and push a Docker image to Docker Hub within a Jenkins pipeline?
Not quite. Try another option.
Answer: Use the Jenkins Credentials Binding plugin (e.g., withCredentials block) to securely pass the username and password to docker login.
The Credentials Binding plugin allows you to securely inject secrets stored in Jenkins into the pipeline context without hardcoding them or exposing them in the build logs.
Question 30 of 60 · Jenkins CI/CD Deployment Flows: Jenkins agents (SSH/SFTP/Container-based) · Medium
To add a new Linux-based Jenkins agent via SSH, which of the following is an absolute requirement on the target agent machine?
Not quite. Try another option.
Answer: A running SSH daemon and a compatible Java Runtime Environment (JRE).
For Jenkins to connect and control an agent via SSH, the agent must be accessible over SSH and have Java installed, as the Jenkins master copies and runs the remoting.jar (agent process) using Java.
Question 31 of 60 · Jenkins Pipelines: Jenkins multi-branch pipelines · Medium
How does a Jenkins Multi-branch Pipeline decide which branches to automatically build?
Not quite. Try another option.
Answer: It scans the repository and creates a pipeline only for branches that contain a recognized Jenkinsfile.
Multi-branch pipelines automatically discover and manage jobs for multiple branches in a repository by checking if the branch contains a Jenkinsfile. If it does, Jenkins creates and triggers a job for that branch.
Question 32 of 60 · Pipeline Stages: Post actions · Medium
In a Declarative Pipeline, how can you ensure an email notification is sent ONLY when the build status changes from successful to failing?
Not quite. Try another option.
Answer: Use the post { regression { ... } } block.
The regression condition in the post block is specifically designed to execute steps when the current build's status is worse than the previous build's status (e.g., going from Success to Failure).
Question 33 of 60 · Jenkins CI/CD Deployment Flows: Pipeline libraries · Medium
What is the primary purpose of Jenkins Shared Libraries?
Not quite. Try another option.
Answer: To encapsulate and reuse common Groovy pipeline code across multiple Jenkinsfiles.
Shared libraries allow DevOps teams to extract common pipeline logic (written in Groovy) into a centralized Git repository, which can then be imported and reused in various Jenkinsfiles across different projects.
Question 34 of 60 · Jenkins Pipelines: Scripted pipeline syntax · Medium
Which of the following represents a significant difference between Scripted Pipeline syntax and Declarative Pipeline syntax?
Not quite. Try another option.
Answer: Scripted pipelines are executed sequentially using native Groovy control structures (like if/else), while Declarative pipelines rely on predefined structure directives (like when).
Scripted pipeline is an imperative, Groovy-based syntax that utilizes standard programming control flow (try/catch, if/else). Declarative pipeline provides a strict, structured configuration model using specific blocks.
Question 35 of 60 · Backup & restore · Medium
To perform a complete backup of Jenkins, including job configurations, plugin configurations, and build histories, which directory is the most critical to back up?
Not quite. Try another option.
Answer: $JENKINS_HOME
The $JENKINS_HOME directory contains all the configuration files, job definitions, build logs, and plugin configurations required to restore Jenkins to its exact state.
Question 36 of 60 · Jenkins and Maven: Code coverage & test reports · Medium
After running mvn clean test jacoco:report in a Jenkins pipeline, how is the coverage report typically visualized on the Jenkins UI?
Not quite. Try another option.
Answer: By using a post-build step provided by a plugin like JaCoCo or Cobertura to parse the generated XML/HTML reports.
To visualize code coverage in Jenkins, you must generate the report using a build tool (like Maven with JaCoCo) and then use a Jenkins plugin (e.g., JaCoCo plugin) in the post-actions to parse the output and display it.
Question 37 of 60 · Pipeline best practices · Medium
According to Jenkins best practices, why should complex logic and heavy processing be avoided directly inside the Jenkins Master node (e.g., inside the Jenkinsfile Groovy context without an agent)?
Not quite. Try another option.
Answer: Because executing heavy builds on the master can consume CPU/Memory resources needed to manage the UI and agent coordination, causing Jenkins to crash.
The Jenkins master is responsible for orchestrating builds, handling the UI, and managing plugins. Running heavy workloads on the built-in node (master) can exhaust its resources, leading to instability.
Question 38 of 60 · Jenkins Foundations: Security, users, roles · Medium
When implementing Role-Based Access Control (RBAC) in Jenkins using the Role Strategy Plugin, how are permissions applied to specific jobs?
Not quite. Try another option.
Answer: By creating a 'Project Role' with a regular expression pattern that matches the job names, and assigning users to that role.
In Jenkins RBAC (Role Strategy Plugin), Project Roles use regular expressions (Regex) to map permissions to specific jobs that match the regex pattern, restricting users to only view or build those specific jobs.
Question 39 of 60 · Docker and Jenkins Integration: Building Docker images using Jenkins · Medium
In a Declarative Pipeline, which block is used to specify that the entire pipeline should execute inside a specific Docker container rather than directly on the agent's host OS?
Using agent { docker { image '...' } } at the top level of a Declarative Pipeline instructs Jenkins to dynamically pull the specified image, start a container, and execute the pipeline steps inside that container.
Question 40 of 60 · Jenkins CI/CD Deployment Flows: Deployments to servers/clouds · Medium
When configuring a deployment step in a pipeline to push code to a remote Linux server via SSH, which approach ensures the pipeline handles host key verification securely without hanging the build?
Not quite. Try another option.
Answer: Pre-configure the Jenkins agent's ~/.ssh/known_hosts file with the target server's key, or use SSH plugins that handle host key verification dynamically.
Pipelines run non-interactively. If a host key is unverified, the SSH command will hang waiting for user confirmation. You must either pre-populate the known_hosts file or use a plugin/ssh flag to handle it automatically.
Question 41 of 60 · Jenkins Foundations: Jenkins architecture (Master/Agent model) · Hard
In a distributed Jenkins architecture operating across multiple isolated network zones, you need to connect an agent residing in a private subnet (no inbound internet access) to a Jenkins Master in a public cloud. Which connection strategy and configuration is most secure and architecturally appropriate?
Not quite. Try another option.
Answer: Configure the agent as an Inbound Agent (JNLP/WebSocket) so the agent initiates an outbound connection to the Master's TCP port.
In environments where the agent is in a private subnet and cannot accept inbound connections, the Master cannot initiate SSH connections to it. Using an Inbound Agent (formerly JNLP) allows the agent to initiate an outbound TCP/WebSocket connection to the Master, bypassing NAT and inbound firewall restrictions.
Question 42 of 60 · Jenkins Foundations: Security, users, roles · Hard
When utilizing the Role-Based Strategy plugin for Jenkins security, a user is assigned a Global role with 'Overall/Read' access and an Item role matching the regex ^PROD-.* with 'Job/Build' access. However, the user cannot see any jobs starting with PROD-. What is the most likely cause of this issue?
Not quite. Try another option.
Answer: The Item role also requires 'Job/Read' permissions to make the jobs visible, as 'Job/Build' does not implicitly grant read access.
In Jenkins Role-Based Access Control, permissions are explicitly granted. Having 'Job/Build' allows triggering a build, but without 'Job/Read' (or 'Item/Read' depending on the exact version terminology), the user cannot see the job in the UI to interact with it.
Question 43 of 60 · Jenkins Pipelines: Declarative pipeline syntax · Hard
In a Declarative Pipeline, you have a stage that requires a heavy Docker agent to run. You want to execute a when condition based on a branch name before Jenkins provisions the Docker agent, to save compute resources. How can this be achieved?
Not quite. Try another option.
Answer: Include beforeAgent true inside the when directive of that stage.
By default, the when condition is evaluated after entering the agent for that stage. Adding beforeAgent true tells Jenkins to evaluate the condition first, and if it evaluates to false, the agent is never provisioned, saving resources.
Question 44 of 60 · Jenkins Pipelines: Declarative pipeline syntax · Hard
When defining a matrix block in a Declarative Pipeline to test multiple combinations of OS and browsers, you want to skip the combination of OS 'macOS' and browser 'Internet Explorer'. Which syntax correctly prevents this specific cell from executing?
Not quite. Try another option.
Answer: Use an exclude directive containing an axis block defining the specific name and values to omit.
Declarative matrix syntax uses an exclude block containing axis definitions to filter out specific combinations from being generated and executed.
Question 45 of 60 · Jenkins Pipelines: Scripted pipeline syntax · Hard
You are writing a Scripted Pipeline that dynamically generates parallel execution branches based on an array of environments. You want all parallel branches to finish execution even if one fails, so you can gather complete test results. Which approach guarantees this behavior?
Not quite. Try another option.
Answer: Use try/catch blocks inside the closure of each dynamically generated branch.
In Scripted Pipeline, failFast: true aborts other branches if one fails, but setting it to false (the default) does not prevent the pipeline itself from failing immediately when a branch propagates an exception. Wrapping the code inside each parallel branch with try/catch (or catchError) is required to trap failures individually and allow all branches to run to completion.
Question 46 of 60 · Jenkins CI/CD Deployment Flows: Pipeline libraries · Hard
You are utilizing a Jenkins Shared Library and need to load a static configuration file (e.g., config.json) stored in the library's resources folder securely within a sandbox-restricted Scripted Pipeline. Which method is correct and adheres to Jenkins security practices?
Not quite. Try another option.
Answer: Use the libraryResource step: def config = libraryResource 'config.json'
The libraryResource step is provided specifically by the Jenkins Shared Library plugin to securely read files from the resources/ directory of the shared library without triggering sandbox security restrictions associated with standard java.io.File usage.
Question 47 of 60 · Jenkins CI/CD Deployment Flows: Pipeline libraries · Hard
What is a primary functional difference between importing a shared library using the @Library('my-lib') _ annotation versus dynamically loading it using the library 'my-lib' step within a pipeline?
Not quite. Try another option.
Answer: The library step can be used conditionally during pipeline execution, while @Library resolves and loads before the script compiles.
The @Library annotation is evaluated at compile time before the pipeline starts executing, meaning it cannot be loaded conditionally or use runtime parameters for its version. The library step executes at runtime, allowing conditional loading and dynamic version resolution based on variables.
Question 48 of 60 · Jenkins Pipelines: Parameters, environment variables · Hard
In a Declarative Pipeline, an environment variable APP_ENV is defined in three places: as a global parameter (parameters { string(name: 'APP_ENV', defaultValue: 'dev') }), in the global environment block (environment { APP_ENV = 'qa' }), and inside a specific stage environment block (environment { APP_ENV = 'prod' }). What will be the value of env.APP_ENV when accessed within a script step in that specific stage?
Not quite. Try another option.
Answer: prod
In Declarative Pipeline, environment variable resolution follows scope precedence. Variables defined in a stage's environment block override those in the global environment block, which in turn override build parameters.
Question 49 of 60 · Jenkins Pipelines: Jenkins multi-branch pipelines · Hard
In a Jenkins Multi-branch Pipeline project mapped to a GitHub repository, the 'Orphaned Item Strategy' is configured to discard old items with 'Max # of old items to keep' set to 0. A developer deletes a feature branch on GitHub. What happens to the corresponding Jenkins job and its build history on the next branch indexing?
Not quite. Try another option.
Answer: The branch job and all of its build history are immediately deleted from Jenkins.
The Orphaned Item Strategy dictates what happens to Jenkins jobs when their corresponding branches are deleted in the SCM. Setting 'Max # of old items to keep' to 0 instructs Jenkins to immediately delete the orphaned job and all its build history upon the next indexing.
Question 50 of 60 · Docker and Jenkins Integration: Docker inside Jenkins agents · Hard
You are implementing Docker-out-of-Docker (DooD) on a Jenkins agent by mounting /var/run/docker.sock into the Jenkins agent container. Which of the following is the most critical security risk associated with this configuration?
Not quite. Try another option.
Answer: A compromised Jenkins agent can easily gain root-level access to the underlying host system.
Mounting /var/run/docker.sock gives the Jenkins agent container access to the host's Docker daemon. Since the Docker daemon runs as root, a user inside the agent container can spawn a privileged container that mounts the host's root filesystem, effectively granting full root access to the host.
Question 51 of 60 · Docker and Jenkins Integration: Using Docker plugins · Hard
When using docker.image('maven:3-alpine').inside { ... } in a Jenkins Pipeline, how does the Docker Pipeline plugin handle the Jenkins workspace by default?
Not quite. Try another option.
Answer: It mounts the host's workspace directory as a bind mount into the container using the exact same path.
The image.inside() method automatically mounts the Jenkins agent's workspace directory into the Docker container as a bind mount using the same absolute path. This ensures that SCM checkouts and generated artifacts are directly accessible to both the container and the host agent.
Question 52 of 60 · Docker and Jenkins Integration: Publishing images to Docker Hub/GHCR · Hard
A pipeline uses the docker global variable to push an image to an external registry: docker.withRegistry('https://registry.example.com', 'registry-credentials-id') { ... }. How does the Docker Pipeline plugin manage the credentials during this block?
Not quite. Try another option.
Answer: It generates a temporary config.json file containing the authentication token and mounts it into the container.
To prevent credentials from leaking in shell history or environment variables, docker.withRegistry creates a temporary, isolated Docker config.json file with the authentication payload and points the DOCKER_CONFIG environment variable to it during the block's execution.
Question 53 of 60 · Jenkins CI/CD Deployment Flows: Deployments to servers/clouds · Hard
In a Continuous Deployment pipeline, multiple commits might trigger concurrent builds. You want to ensure that an older build that took longer to test does not overwrite a deployment from a newer build that finished faster. Which Declarative Pipeline step/feature natively provides this concurrency control?
Not quite. Try another option.
Answer: The milestone step placed at critical boundaries.
The milestone step prevents older builds from overriding newer ones. If a newer build passes a milestone, any older concurrent build that later reaches that same milestone will be automatically aborted.
Question 54 of 60 · Jenkins CI/CD Deployment Flows: Triggering builds (pollSCM, webhook) · Hard
Jenkins is configured to trigger a build via a GitHub Webhook. If GitHub sends two push events for the exact same commit hash simultaneously, and the job is currently not running, how does the Jenkins quiet period and queue mechanism handle this?
Not quite. Try another option.
Answer: Jenkins merges the two identical webhook requests in the queue and starts only one build.
When multiple requests to build the exact same job with the same parameters (or exact same commit in SCM triggering) enter the queue during the quiet period, Jenkins' default queue optimization merges them into a single build to avoid redundant executions.
Question 55 of 60 · Jenkins and Maven: Code coverage & test reports · Hard
During a Maven build stage (sh 'mvn clean test'), some tests fail, causing the step to return a non-zero exit code. You still want the pipeline to proceed to the next stage to publish JUnit test reports but ultimately mark the build as unstable/failed. Which scripted syntax correctly handles this?
Not quite. Try another option.
Answer: Use catchError(buildResult: 'UNSTABLE', stageResult: 'FAILURE') { sh 'mvn clean test' }
catchError allows the pipeline to catch the shell step failure (non-zero exit code), continue executing subsequent steps (like publishing test reports), and appropriately sets the build and stage results. Using || true masks the failure entirely, while try/finally requires manual manipulation of exceptions and build status.
Question 56 of 60 · Jenkins Foundations: Backup & restore · Hard
When performing a live backup of the JENKINS_HOME directory via filesystem snapshots (e.g., LVM or ZFS) while jobs are actively running, which specific subdirectory is most prone to data corruption or inconsistent states upon restoration?
Not quite. Try another option.
Answer: jobs/<job_name>/builds/
The builds/ directory contains active build logs and states being continuously written to disk. Taking a snapshot without putting Jenkins into 'Quiet Down' mode can capture this directory in a mid-write state, leading to broken builds or corrupted logs upon restoration.
Question 57 of 60 · Jenkins and Maven: Global tool configuration · Hard
A Jenkins Declarative Pipeline specifies tools { maven 'Maven-3.8' }. The Jenkins master has this tool configured to auto-install via Apache. However, the build runs on a Windows agent where executing shell scripts is not natively supported. How does Jenkins handle the Maven installation on the Windows agent?
Not quite. Try another option.
Answer: Jenkins uses Java to download, extract the zip/tarball, and correctly configures the PATH and M2_HOME environment variables regardless of the OS.
Jenkins' Global Tool Configuration auto-installers are implemented in Java. When Jenkins provisions a tool on an agent, it downloads and extracts the binaries natively using the JVM, making it OS-agnostic, and correctly maps the environment variables for the agent's OS.
Question 58 of 60 · Jenkins Pipelines: Pipeline Stages: Managing artifacts · Hard
You have an upstream job 'Build-Core' that archives a .jar artifact and a downstream job 'Deploy-Core' that retrieves it using the Copy Artifact plugin. To ensure end-to-end traceability of where a specific .jar version was deployed, what must be configured?
Not quite. Try another option.
Answer: Enable 'Fingerprint all archived artifacts' in the upstream job and use the fingerprint step in the downstream job after copying.
Fingerprinting creates a MD5 checksum of an artifact. By recording this fingerprint in both the upstream job (when it is created) and the downstream job (when it is used/copied), Jenkins maintains a database of exactly which build produced the artifact and which builds utilized it, providing end-to-end traceability.
Question 59 of 60 · Jenkins CI/CD Deployment Flows: Jenkins agents (SSH/SFTP/Container-based) · Hard
When provisioning dynamic container-based Jenkins agents using the Kubernetes plugin, you notice the pod starts, but Jenkins immediately terminates the pod after 100 seconds with an 'Agent offline' error. The pod logs show that your custom build container completed its initial command. What is the fundamental misconfiguration?
Not quite. Try another option.
Answer: The pod lacks a jnlp container or the custom container did not override the entrypoint to run the Jenkins remoting agent.
Jenkins requires a remoting agent (usually named jnlp) running inside the Kubernetes pod to establish communication with the master. If the pod does not include this agent process, or if a custom container overrides the default behavior without initiating the remoting jar, the master cannot connect and will terminate the unresponsive pod.
Question 60 of 60 · Docker and Jenkins Integration: Jenkins and GitHub integration · Hard
To secure Jenkins from unauthorized payload spoofing via GitHub webhooks, you configure an HMAC secret in the GitHub App/Webhook settings. How does the Jenkins GitHub plugin validate this incoming payload?
Not quite. Try another option.
Answer: It computes the SHA-256 hash of the payload body using the configured shared secret and compares it to the X-Hub-Signature-256 header.
When a webhook secret is configured, GitHub signs the payload using an HMAC hex digest and sends it in the X-Hub-Signature-256 header. The Jenkins GitHub plugin recalculates the hash of the received payload using its stored secret and verifies that the signatures match, confirming authenticity.
That's unit 6
Answer a few questions and your score shows up here.
Nearly through. Did unit 6 of INT332 save you a night before the exam?
LPU Notes is free. A student pays for the servers.
Did unit 6 of INT332 save you a night before the exam?
Then you can help keep it free for the next batch. Ads cover part of the server bill;
the rest comes out of a student's own pocket: the domain, the storage, and keeping
the site up through the weeks everyone needs it at once.
The payment button didn't load. An ad blocker or a filtered network is the usual reason.
to try again.