Jenkins Advanced Quiz
← Back to Quiz Home
Welcome! 🤵♂️
Challenge yourself with advanced Jenkins scenarios, security, and scaling.
Instructions :
Select the best answer for each question.
Your score will be shown at the end.
what is the Groovy script approved to run in Jenkins sandbox by default?
The Script Security plugin integrates with the Groovy Sandbox to restrict what scripts can do unless approved by an administrator.
How do you set up a high-availability (HA) Jenkins environment?
Open-source Jenkins is generally Active-Passive. Enterprise versions (CloudBees) offer Active-Active HA.
What is the purpose of the stash and unstash steps in Pipeline?
stash saves files for use later in the same build, often on a different agent/node. archiveArtifacts is for long-term storage after the build.
What happens if the Jenkins Controller goes down during a build?
Generally, connection loss to the controller causes pipelines to fail unless using durable tasks that survive restart (which is standard now, but restarting the controller usually interrupts the flow).
Which allows using Docker containers as dynamic build agents?
Plugins like docker-plugin or kubernetes-plugin allow spinning up ephemeral agents for each build.
What is the "Replay" feature in Jenkins Pipelines?
Replay allows you to quick-fix and re-run a pipeline build for debugging purposes.
How can you prevent a Job from running concurrently?
disableConcurrentBuilds() ensures only one instance of the pipeline runs at a time.
What is the difference between node and agent in scripted vs declarative pipelines?
node allocates an executor in Scripted Pipeline. agent is the declarative directive that manages node allocation.
How can you parse JSON in a Jenkins Pipeline?
readJSON is a common step provided by the Pipeline Utility Steps plugin. JsonSlurper is a standard Groovy class.
What is "Matrix Authorization Strategy"?
It allows you to configure exactly which users or groups can do what (Read, Build, Configure, Delete, etc.).
What is the lock step used for?
The Lockable Resources plugin allows you to define a lock step to ensure exclusive access to a resource (like a database or environment) during a stage.
What is a "Seed Job" in the context of Job DSL?
The Seed Job processes the Job DSL script and creates/updates the full hierarchy of managed jobs.
How do you deal with "PermGen" or "Metaspace" errors in Jenkins?
Jenkins creates many classes dynamically. Increasing Metaspace allows more classes to be loaded without crashing the JVM.
What is the main advantage of using the Kubernetes Plugin?
It creates a fresh Pod for every build and destroys it afterwards, providing clean, isolated environments and cost-effective scaling.
What is the "Durable Task" plugin?
It allows a step (like sh) to survive a controller restart by running the process asynchronously and persisting its PID/state.
How do you enforce code style/linting on Jenkinsfiles?
The Jenkins CLI/API provides a linter endpoint to validate Declarative Pipeline syntax.
What is cps in "Non-CPS"?
CPS is how Jenkins pauses/resumes pipelines. @NonCPS marks methods to run as native compiled Groovy (faster, but cannot pause/wait).
Why would you use @Library('my-lib@master') _?
The @version syntax specifies which branch or tag of the shared library to use for that build.
What is the purpose of the validateDeclarativePipeline step?
It takes a path to a file and returns errors if the syntax is invalid.
How can you trigger a pipeline from a remote script?
curl -X POST user:token@jenkins/job/myjob/build?token=MYTOKEN is the standard way to trigger builds remotely.
Quiz Progress
0 / 0 questions answered
(0% )
0 correct
Quiz Complete!
0%
Reset quiz
📚 Study Guides
📬 Weekly DevOps, Cloud & Gen AI quizzes & guides