




















































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!





















































Question 1. Which DevOps principle most directly promotes āfail fastā by encouraging frequent integration of code changes? A) Infrastructure as Code B) Continuous Integration C) Continuous Delivery D) Immutable Infrastructure Answer: B Explanation: Continuous Integration requires developers to merge changes often, revealing defects early. Question 2. In the software development lifecycle, the stage where automated tests are run after each code commit is: A) Requirements Gathering B) Build C) Test D) Deploy Answer: C Explanation: The Test stage executes unit, integration, and functional tests triggered by CI builds. Question 3. Which term describes storing the build definition in source control alongside application code? A) Configuration Management B) Pipeline as Code C) Artifact Repository D) Release Management Answer: B Explanation: āPipeline as Codeā means the Jenkinsfile resides in the same repository as the source. Question 4. In CloudBees CI, the component that schedules builds and stores configuration is called: A) Agent B) Controller C) Operations Center D) Executor Answer: B Explanation: The Controller (formerly Jenkins master) runs the scheduler and holds job definitions. Question 5. An entity that runs build steps on a remote machine in CloudBees CI is known as: A) Controller B) Node C) Plugin D) Credential Answer: B
Explanation: āNodeā (or Agent) provides the execution environment for builds. Question 6. Which feature distinguishes CloudBees CI from open-source Jenkins? A) Unlimited plugins B) Built-in SCM C) Centralized Operations Center for multi-controller management D) Free unlimited agents Answer: C Explanation: The Operations Center lets administrators manage many Controllers from a single UI. Question 7. The primary purpose of the Operations Center UI is to: A) Edit Jenkinsfiles B) View build logs C) Manage Controllers and shared resources D) Run shell commands on agents Answer: C Explanation: Operations Center provides governance, licensing, and resource sharing across Controllers. Question 8. To view the health of a Controller, you would navigate to which section in the UI? A) Manage Jenkins ā System Log B) Dashboard ā Load Statistics C) Manage Jenkins ā About D) Controller ā Health Check Answer: D Explanation: The Health Check page shows JVM, disk, and plugin status for the Controller. Question 9. Which Jenkins UI element lists all jobs defined on a Controller? A) Build History B) Manage Plugins C) Job Dashboard D) New Item dropdown Answer: C Explanation: The Job Dashboard (or āAllā view) displays every job/project on the Controller.
Explanation: Stages organize the pipeline flow, while steps are the commands executed inside a stage. Question 15. To create a multibranch pipeline that automatically discovers branches in a Git repository, you must configure which SCM type? A) Subversion B) Mercurial C) Git D) CVS Answer: C Explanation: The Multibranch Pipeline scans a Git repo for branches and creates jobs per branch. Question 16. Which Jenkinsfile directive allows you to pass parameters to a Pipeline at start-up? A) environment B) parameters C) tools D) triggers Answer: B Explanation: The parameters block defines input fields that users can fill when triggering the build. Question 17. When a Pipeline run is triggered manually without providing required parameters, Jenkins will: A) Skip the build B) Use default values if defined C) Fail immediately D) Prompt the user again Answer: B Explanation: If defaults are supplied in the parameters block, Jenkins uses them; otherwise the build fails. Question 18. In the Blue Ocean UI, the visual representation of a Pipelineās execution flow is called: A) Stage View B) Flow Diagram C) Timeline D) Activity Graph Answer: A Explanation: Blue Oceanās Stage View shows each stageās status and duration.
Question 19. Which log location provides the console output for a finished build? A) System Log B) Build History ā Console Output C) Agent Log D) Jenkinsfile Viewer Answer: B Explanation: The āConsole Outputā link on a build page displays the raw build log. Question 20. A common cause of a Declarative Pipeline failure is: A) Missing post block B) Incorrect indentation in the Jenkinsfile C) Using sh on a Windows agent D) Defining more than three stages Answer: B Explanation: Declarative Pipelines are whitespace-sensitive; improper indentation leads to syntax errors. Question 21. Which step archives build artifacts for later retrieval? A) stash B) archiveArtifacts C) publishHTML D) copyArtifacts Answer: B Explanation: archiveArtifacts stores specified files in the buildās artifact directory. Question 22. After a build completes, where can a user download archived artifacts? A) Build ā Workspace B) Build ā Artifacts C) Manage Jenkins ā Artifacts D) System Log ā Artifacts Answer: B Explanation: The āArtifactsā link on the build page lists downloadable files. Question 23. To configure Maven for use in a Pipeline, you would first add it in: A) Manage Jenkins ā Global Tool Configuration B) Job ā Configure ā Build Environment C) Pipeline ā Settings D) Credentials ā System Answer: A
Question 28. Which of the following best describes the purpose of āstashā and āunstashā steps? A) Archive artifacts to external storage B) Share files between parallel stages in the same build C) Persist credentials across builds D) Trigger downstream jobs Answer: B Explanation: stash saves files temporarily; unstash retrieves them in another stage or node. Question 29. To enforce that a build only runs on Linux agents, which agent directive is appropriate? A) agent any B) agent none C) agent { label 'linux' } D) agent { docker 'ubuntu' } Answer: C Explanation: Specifying a label restricts execution to agents matching that label. Question 30. The post block in a Declarative Pipeline is executed: A) Before any stage B) After each step C) After the entire Pipeline finishes, regardless of success or failure D) Only on successful builds Answer: C Explanation: post runs after the Pipeline ends and can have always, success, failure, etc. Question 31. Which of the following is NOT a valid trigger for automatically starting a Pipeline? A) SCM polling B) Timer (cron) C) Manual button D) HTTP 404 response Answer: D Explanation: HTTP 404 is not a Jenkins trigger; polling, cron, and manual start are supported. Question 32. In CloudBees CI, the āLicense Managementā page is found under:
A) Manage Jenkins ā System Configuration B) Operations Center ā License Management C) Dashboard ā License Overview D) Credentials ā System Answer: B Explanation: The Operations Center handles licensing for all connected Controllers. Question 33. Which of these statements about āShared Librariesā is true? A) They replace the Jenkinsfile entirely B) They allow reusable Groovy code across multiple Pipelines C) They must be stored in the same repository as the Pipeline D) They can only be used in scripted pipelines Answer: B Explanation: Shared Libraries provide common functions that multiple Pipelines can import. Question 34. When a Pipeline fails during the checkout scm step, the most likely cause is: A) Missing post block B) Invalid repository URL or credentials C) No agent defined D) Too many stages Answer: B Explanation: checkout scm requires correct SCM URL and access rights. Question 35. Which Jenkinsfile syntax declares an environment variable that is available to all stages? A) environment { MY_VAR = 'value' } B) env.MY_VAR = 'value' C) withEnv(['MY_VAR=value']) D) setEnv('MY_VAR','value') Answer: A Explanation: The environment block at the top of Declarative Pipeline defines global vars. Question 36. To limit the number of concurrent builds of a job, you would configure: A) Throttle Concurrent Builds plugin B) Build Discarder C) Quiet Period D) Build Blocker
Question 41. When configuring a Multibranch Pipeline, which option enables automatic discovery of pull requests? A) Discover branches only B) Discover tags C) Discover pull requests from origin D) Disable PR detection Answer: C Explanation: Enabling āDiscover pull requests from originā makes Jenkins create jobs for PRs. Question 42. The when directive in Declarative Pipelines is used to: A) Define environment variables B) Skip stages based on conditions C) Set post-build actions D) Choose the agent label Answer: B Explanation: when allows conditional execution of a stage (e.g., only on master branch). Question 43. Which of the following is NOT a built-in credential type in Jenkins? A) Secret File B) SSH Username with Private Key C) API Key D) Secret Text Answer: C Explanation: āAPI Keyā is not a distinct type; tokens are stored as Secret Text. Question 44. In a Pipeline, the step input is used to: A) Pause the build and request human approval B) Read a file from the workspace C) Capture environment variables D) Trigger another job Answer: A Explanation: input creates a prompt that must be answered before the Pipeline proceeds. Question 45. Which Jenkins plugin provides the āPipeline: Groovyā DSL support for scripted pipelines?
A) Workflow Aggregator B) Pipeline Utility Steps C) Pipeline Model Definition D) Pipeline Groovy Plugin Answer: D Explanation: The Pipeline Groovy plugin enables scripted pipeline syntax. Question 46. To automatically clean up old builds older than 30 days, you would configure: A) Build Discarder with āDays to keepā set to 30 B) Quiet Period C) Log Rotator plugin D) Artifact Retention Policy Answer: A Explanation: The Log Rotator (Build Discarder) removes builds based on age or count. Question 47. Which of the following statements about āAgent ā Dockerā is correct? A) The Docker image must be pre-installed on the Controller B) Each build runs in a fresh container based on the specified image C) Docker agents cannot access the workspace D) Only Windows agents can use Docker Answer: B Explanation: Jenkins launches a new container per build when using the Docker agent. Question 48. The āPipeline Syntaxā link in the Jenkins UI helps you: A) Write Groovy scripts from scratch B) Generate snippet code for steps and plugins C) Validate Jenkinsfile syntax only D) Deploy pipelines to production Answer: B Explanation: The Snippet Generator creates the correct Groovy for selected steps. Question 49. Which of the following is a reason for a build to be marked āUNSTABLEā? A) Compilation error B) Test failures that are marked as āunstableā C) Missing credentials D) Disk full on the agent
Answer: C Explanation: Declarative enforces a top-level structure, making them more approachable. Question 54. In CloudBees CI, the āLicense Statusā indicator turns red when: A) An agent is offline B) The Controller has no active license C) Disk usage exceeds 80% D) A job fails Answer: B Explanation: License status reflects the validity of the CloudBees CI license. Question 55. Which Jenkinsfile directive allows you to run a stage on a different agent than the rest of the Pipeline? A) agent none B) stage('X') { agent { label 'windows' } steps { ⦠} } C) tools { ⦠} D) environment { ⦠} Answer: B Explanation: The stage-level agent overrides the top-level agent for that stage only. Question 56. The āArtifact Archivingā step should be placed in which part of a Declarative Pipeline to ensure artifacts are stored even if the build fails? A) stages B) post { always { archiveArtifacts ⦠} } C) environment D) options Answer: B Explanation: The always condition in post runs regardless of success or failure. Question 57. Which of the following is the correct syntax to define a parameter of type āChoiceā with options ādevā, āstageā, āprodā? A) parameters { choice(name: 'ENV', choices: ['dev','stage','prod'], description: 'Target') } B) choice(name: 'ENV', choices: 'dev\nstage nprod') C) parameters { choice(name: 'ENV', choices: "dev\nstage\nprod", description: 'Target') } D) paramChoice('ENV', ['dev','stage','prod'])
Answer: C Explanation: The choice parameter expects a newline-separated string for choices. Question 58. When a Pipeline uses the checkout scm step, which environment variable automatically contains the Git commit SHA? A) GIT_COMMIT B) CHANGE_ID C) BUILD_NUMBER D) SCM_REVISION Answer: A Explanation: Jenkins populates GIT_COMMIT after a Git checkout. Question 59. Which of the following best describes āAgent ā Dockerfileā usage? A) Pulls an image from Docker Hub B) Builds a Docker image from a Dockerfile in the workspace and runs the build inside it C) Executes Docker commands on the host D) Only works on Windows agents Answer: B Explanation: dockerfile builds a custom image from a Dockerfile before executing the Pipeline. Question 60. To restrict a job so that only members of the ādev-teamā group can run it, you would configure: A) Project-based Matrix Authorization B) Role-Based Strategy plugin with a role for the job C) Credential permissions D) SCM permissions Answer: B Explanation: Role-Based Strategy lets you assign run permissions per group. Question 61. Which of the following statements about āPipeline Parallel Stagesā is correct? A) Parallel stages must be defined inside a script block B) They are declared using parallel within a stageās steps C) Parallel execution is only available on Windows agents D) Parallel stages cannot share artifacts Answer: B
Question 66. Which of the following best explains the purpose of āBuild With Parametersā in the UI? A) To edit the Jenkinsfile B) To provide values for defined parameters before running a job C) To view build history D) To set the jobās description Answer: B Explanation: It prompts the user to fill in parameter values when launching the job. Question 67. In a Declarative Pipeline, the options { timeout(time: 30, unit: 'MINUTES') } directive will: A) Cancel the build after 30 minutes of inactivity B) Abort the entire Pipeline if it exceeds 30 minutes C) Pause the build for 30 minutes D) Set a timeout for each stage individually Answer: B Explanation: The timeout option applies to the whole Pipeline run. Question 68. Which of these is NOT a default view in Jenkins? A) All B) Dashboard C) Build History D) My Views Answer: B Explanation: āDashboardā is not a default view; āAllā, āBuild Historyā, and āMy Viewsā are. Question 69. The āQuiet Periodā is particularly useful in which scenario? A) When builds are very fast B) When many developers push multiple commits in quick succession C) When you want to disable notifications D) When you need to run builds on weekends only Answer: B Explanation: It aggregates rapid commits into a single build, reducing unnecessary runs.
Question 70. Which of the following plugins provides the āCredentials Bindingā feature used in Pipelines? A) Credentials Plugin B) Credential Binding Plugin C) Secure Secrets Plugin D) EnvInject Plugin Answer: B Explanation: The Credentials Binding plugin adds the withCredentials step. Question 71. To enable Jenkins to automatically delete archived artifacts older than 10 builds, you would configure: A) Artifact Retention in the job configuration B) System Log rotation C) Global Tool Configuration D) Agent Disk Cleanup Answer: A Explanation: The āDiscard Old Buildsā section includes an artifact retention count. Question 72. Which of the following is a valid syntax to run a shell command on a Windows agent using PowerShell? A) sh 'Get-Process' B) bat 'powershell -Command "Get-Process"' C) powershell 'Get-Process' D) script 'Get-Process' Answer: C Explanation: The powershell step runs a command in PowerShell on Windows agents. Question 73. In CloudBees CI, the āOperations Centerā can be accessed at which default URL pattern? A) http:///oc B) http:///operations C) http:///manage D) http:/// Answer: D Explanation: The Operations Center runs as a Jenkins instance reachable at its root URL. Question 74. Which of the following best describes āPipeline Lintingā?
A) To run multiple pipelines in parallel on a single node B) To automatically create a Pipeline job for each branch in an SCM repository C) To merge pipelines from different Jenkins instances D) To schedule pipelines on a calendar Answer: B Explanation: It scans the repository and creates a job per branch/PR. Question 79. In a Declarative Pipeline, the script block is used to: A) Define environment variables B) Write arbitrary Groovy code not covered by Declarative syntax C) Configure agents D) Archive artifacts Answer: B Explanation: script allows embedding scripted-pipeline code inside Declarative. Question 80. Which of the following is a typical use case for the stash/unstash steps? A) Persisting credentials across builds B) Sharing compiled binaries between parallel stages C) Deleting old workspace files D) Triggering downstream jobs Answer: B Explanation: stash temporarily stores files that can be retrieved later in another stage or node. Question 81. The āAgent ā Usageā option set to āUtilize this node as much as possibleā means: A) The node will be used for both builds and internal Jenkins tasks B) The node will only run system maintenance C) The node is disabled for builds D) The node runs only on weekends Answer: A Explanation: This setting allows the node to serve any purpose, including Jenkins internal work. Question 82. Which of the following statements about āPipeline Trigger on Pushā is correct?
A) It requires the pollSCM trigger B) It uses webhooks from the SCM to start a build immediately C) It only works with Subversion D) It must be configured in the Operations Center global settings Answer: B Explanation: Webhooks notify Jenkins of a push, causing an immediate Pipeline start. Question 83. In CloudBees CI, the āController ā Manage Pluginsā page allows you to: A) Create new agents B) Install, update, or remove plugins for that specific Controller C) Edit the Jenkinsfile directly D) Change the license key Answer: B Explanation: Plugin management is per-Controller, not global. Question 84. Which of the following is the correct way to reference a Maven tool named āM3ā inside a Declarative Pipeline? A) tools { maven 'M3' } B) maven 'M3' C) environment { MAVEN_HOME = tool 'M3' } D) withMaven('M3') { ⦠} Answer: A Explanation: tools { maven 'M3' } tells Jenkins to set up Maven for the build. Question 85. The āBlue Oceanā UI replaces which classic Jenkins view? A) Manage Jenkins B) Configure System C) Classic Dashboard (All Jobs view) D) System Log Answer: C Explanation: Blue Ocean provides a modern replacement for the classic job list/dashboard. Question 86. Which of the following is a valid way to limit a stage to run only on the āmasterā branch? A) when { branch 'master' } B) agent { label 'master' } C) onlyIf { env.BRANCH == 'master' } D) stage('X') { when { expression { return env.BRANCH_NAME == 'master' } } steps { ⦠} }