Docsity

CloudBees CI Associate Practice Exam, Exams of Technology

Toggle sidebar
bg1
CloudBees CI Associate Practice Exam
**Question 1. Which of the following best defines Continuous Integration (CI)?**
A) Deploying code automatically to production after each commit
B) Merging code changes into a shared repository frequently and building them
automatically
C) Running manual tests on a nightly basis
D) Releasing a new version of software every quarter
**Answer: B**
**Explanation:** CI is the practice of frequently integrating code changes into a
shared repository and automatically building and testing them to detect
integration issues early.
**Question 2. What is the primary benefit of adopting Continuous Delivery (CD) in
a software project?**
A) Eliminating the need for any testing
B) Reducing the time between code commit and production deployment to
near‑zero
C) Ensuring every change can be released to production at any time through
automated pipelines
D) Allowing developers to work without version control
**Answer: C**
**Explanation:** Continuous Delivery ensures that the software is always in a
releasable state, making it possible to deploy any change at any moment.
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c
pf2d
pf2e
pf2f
pf30
pf31
pf32
pf33
pf34
pf35
pf36
pf37
pf38
pf39
pf3a
pf3b
pf3c
pf3d
pf3e
pf3f
pf40
pf41
pf42
pf43
pf44
pf45
pf46
pf47
pf48
pf49
pf4a
pf4b
pf4c
pf4d
pf4e
pf4f
pf50
pf51
pf52
pf53
pf54
pf55
pf56
pf57
pf58
pf59
pf5a
pf5b
pf5c
pf5d
pf5e
pf5f
pf60
pf61
pf62
pf63
pf64

Partial preview of the text

Download CloudBees CI Associate Practice Exam and more Exams Technology in PDF only on Docsity!

Question 1. Which of the following best defines Continuous Integration (CI)? A) Deploying code automatically to production after each commit B) Merging code changes into a shared repository frequently and building them automatically C) Running manual tests on a nightly basis D) Releasing a new version of software every quarter Answer: B Explanation: CI is the practice of frequently integrating code changes into a shared repository and automatically building and testing them to detect integration issues early. Question 2. What is the primary benefit of adopting Continuous Delivery (CD) in a software project? A) Eliminating the need for any testing B) Reducing the time between code commit and production deployment to near‑zero C) Ensuring every change can be released to production at any time through automated pipelines D) Allowing developers to work without version control Answer: C Explanation: Continuous Delivery ensures that the software is always in a releasable state, making it possible to deploy any change at any moment.

Question 3. In DevOps, which principle emphasizes “fail fast, recover quickly”? A) Immutable Infrastructure B) Shift‑Left Testing C) Continuous Feedback D) Small Batch Size Answer: D Explanation: Small batch size reduces the amount of work in progress, enabling faster detection of failures and quicker recovery. Question 4. Which stage of the Software Development Lifecycle (SDLC) typically follows “Implementation/Construction”? A) Requirements Gathering B) Testing/Verification C) Deployment/Release D) Maintenance Answer: B Explanation: After code is implemented, it is usually tested to verify that it meets requirements before release. Question 5. What does “Pipeline as Code” (PaC) primarily enable? A) Storing pipeline definitions in a version‑controlled source file B) Writing pipeline scripts directly in the Jenkins UI only

Explanation: Agents provide the execution environment for build steps, running on separate machines or containers. Question 8. What is a “Multibranch Pipeline” job used for? A) Running a single static Jenkinsfile across all branches B) Automatically creating a separate pipeline for each branch in a repository C) Managing credentials across multiple projects D) Deploying to multiple cloud providers simultaneously Answer: B Explanation: Multibranch Pipelines scan a SCM repository and create a distinct pipeline for each branch that contains a Jenkinsfile. Question 9. Which of the following is NOT a core feature that differentiates CloudBees CI from open‑source Jenkins? A) Centralized Operations Center for managing many Controllers B) Built‑in high‑availability for Controllers C) Unlimited free agents for any workload D) Enterprise‑grade security and compliance controls Answer: C Explanation: CloudBees CI provides managed agents, but they are not unlimited and free; enterprise licensing applies.

Question 10. In the CloudBees Operations Center UI, where would you find the list of connected Controllers? A) Dashboard → System Info B) Manage → Controllers C) Agents → Nodes D) Jobs → All Items Answer: B Explanation: The “Controllers” page under the Manage section shows all Controllers registered with the Operations Center. Question 11. How can a user quickly locate a specific job across all Controllers in the Operations Center? A) Use the “Search” bar at the top of the UI B) Navigate to each Controller manually C) Edit the Jenkinsfile of the job D) Restart the Operations Center Answer: A Explanation: The global search functionality lets users find jobs, agents, and other items across Controllers. Question 12. Which view in a Controller shows recent build activity, including status icons and timestamps? A) Configure System

Answer: C Explanation: Every Declarative Pipeline must start with the pipeline block. Question 15. Which directive inside a Declarative Pipeline specifies where the entire pipeline should run? A) stage B) agent C) steps D) tools Answer: B Explanation: The agent directive at the top level defines the node (agent) where the pipeline executes. Question 16. How does the agent any directive affect pipeline execution? A) It forces the pipeline to run on the master only B) It selects any available agent with at least one executor C) It disables agent allocation, running on the controller process D) It creates a new Docker container for each stage Answer: B Explanation: agent any tells Jenkins to run the pipeline on any idle agent that meets the requirements.

Question 17. What is the difference between a “stage” and a “step” in Declarative Pipelines? A) Stages are UI elements; steps are code blocks executed on agents B) Stages define parallelism; steps define environment variables C) Stages group related steps; steps are the individual commands or actions D) Stages are only for post‑build actions; steps are for build actions Answer: C Explanation: Stages provide logical grouping and visualization, while steps are the actual commands executed within a stage. Question 18. Which of the following statements about the post block is true? A) It runs before any stages are executed B) It can contain always, success, failure, and unstable conditions C) It replaces the need for postBuildActions plugins D) It must be placed inside a stage block Answer: B Explanation: The post block defines actions that run after the pipeline finishes, with conditions like always, success, etc. Question 19. When configuring a Pipeline job to read its Jenkinsfile from GitHub, which field must be set? A) Build Triggers → Poll SCM

Answer: B Explanation: When a job is marked as parameterized, Jenkins presents a form to input values before the build starts. Question 22. Where can you view the console output of a completed build? A) Manage → System Log B) Build’s “Console Output” link on the build page C) Tools → Global Tool Configuration D) Credentials → System Answer: B Explanation: Each build page includes a “Console Output” link that shows the raw log. Question 23. Which of the following is a common cause of a pipeline failure that can be identified from the console output? A) Wrong Jenkins version installed on the controller B) Syntax error in the Jenkinsfile C) Insufficient disk space on the client’s workstation D) License expiration of the Operations Center Answer: B Explanation: Syntax errors in the Jenkinsfile are reported during parsing and appear in the console log.

Question 24. Which step is used to archive build artifacts in a Declarative Pipeline? A) archiveArtifacts '/target/.jar' B) stash name: 'artifact', includes: '/.war' C) copyArtifacts projectName: 'my-app' D) uploadArtifacts '*/.zip' Answer: A Explanation: archiveArtifacts is the built‑in step for persisting files as build artifacts. Question 25. After a successful build, where can a user download an archived artifact? A) From the job’s “Configure” page B) From the build’s “Artifacts” link on the build page C) From the Operations Center home screen D) From the “Credentials” section Answer: B Explanation: The build page lists all archived artifacts with download links. Question 26. In the Global Tool Configuration, which tool type would you configure to provide a specific Maven version to pipelines? A) JDK B) Maven

Explanation: Secret Text stores a single string, ideal for API tokens. Question 29. In a pipeline, how would you retrieve a secret text credential with ID my-token? A) withCredentials([string(credentialsId: 'my-token', variable: 'TOKEN')]) { … } B) env.MY_TOKEN = credentials('my-token') C) secret('my-token') D) getCredential('my-token') Answer: A Explanation: withCredentials binds the secret text to an environment variable for use inside the block. Question 30. What is the purpose of the “Blue Ocean” UI in CloudBees CI? A) To manage plugins only B) To provide a modern, visual representation of pipeline execution and stages C) To replace the need for a Jenkinsfile D) To configure global security settings Answer: B Explanation: Blue Ocean presents pipelines in a clean, visual interface, making stage flow and results easier to understand. Question 31. Which of the following best describes the relationship between an Operations Center and a Client Controller?

A) The Operations Center is a backup of the Controller B) The Operations Center centrally manages multiple Controllers, delegating jobs to them C) The Controller hosts the Operations Center UI D) They are unrelated components that never communicate Answer: B Explanation: The Operations Center provides multi‑tenant management of many Controllers, each handling its own jobs. Question 32. How can an administrator view the health status of a Controller from the Operations Center UI? A) By clicking the Controller name and checking the “Health Report” section B) By opening the Jenkinsfile of any job on that Controller C) By navigating to the “Credentials” page on the Operations Center D) By restarting the Controller Answer: A Explanation: The Controller’s health report shows metrics like CPU, memory, and plugin warnings. Question 33. Which of the following is NOT a valid Jenkinsfile directive? A) agent B) triggers C) checkout

Explanation: The Credentials Binding Plugin enables the withCredentials step to inject secrets. Question 36. If a pipeline needs to run on a Docker container, which directive should be used? A) agent any B) agent { docker 'maven:3.8-jdk11' } C) tools docker D) environment dockerImage = '...' Answer: B Explanation: The docker agent directive spins up a container with the specified image for the pipeline. Question 37. What is the effect of setting options { timeout(time: 30, unit: 'MINUTES') } in a pipeline? A) It disables all timeouts for the pipeline B) It aborts the pipeline if any stage exceeds 30 minutes C) It limits the total pipeline execution time to 30 minutes D) It only applies to the post block Answer: C Explanation: The timeout option sets an overall execution timeout for the pipeline.

Question 38. Which of the following best describes a “parameterized” job? A) A job that runs only on a schedule B) A job that accepts user‑defined input values at build start C) A job that cannot be triggered manually D) A job that automatically deletes its workspace after each run Answer: B Explanation: Parameterized jobs expose input fields (e.g., string, choice) for users to supply values when starting a build. Question 39. In the Jenkins UI, where can you view a list of all globally defined credentials? A) Manage Jenkins → System Log B) Credentials → System → Global credentials (unrestricted) C) Build History → Credentials tab D) Tools → Global Tool Configuration Answer: B Explanation: The Credentials page under “System” shows all stored credentials and their scopes. Question 40. Which of the following is a recommended practice for storing secret files (e.g., SSH private keys) in Jenkins? A) Hard‑code the file contents in the Jenkinsfile B) Store the file in the repository and encrypt it with Git‑LFS

Explanation: When an agent is offline, Jenkins queues jobs and may schedule them on other matching agents. Question 43. How can you limit a pipeline to run only on agents labeled “linux && docker”? A) agent any B) agent { label 'linux && docker' } C) node('linux && docker') { … } D) Both B and C are correct Answer: D Explanation: Both the agent { label ... } directive and the scripted node step achieve the same labeling constraint. Question 44. Which Jenkins feature allows you to view the chronological flow of stages with color‑coded status? A) Classic UI → Stage View B) Blue Ocean → Pipeline Run view C) Both A and B D) System Log Answer: C Explanation: Both the classic Stage View and Blue Ocean present a visual stage flow with success/failure colors.

Question 45. When configuring a tool in “Global Tool Configuration,” what does the “Install automatically” option do? A) It forces the tool to be installed on every agent at build time using the selected installer (e.g., Maven installer) B) It disables the tool for all jobs C) It copies the tool from the Controller to the agent manually D) It creates a symbolic link to a local installation only Answer: A Explanation: Automatic installation downloads and installs the tool on agents as needed during builds. Question 46. What is the purpose of the checkout scm step in a pipeline? A) To archive the workspace after the build B) To retrieve the source code from the SCM configured for the job C) To delete the workspace before the build starts D) To trigger downstream jobs automatically Answer: B Explanation: checkout scm checks out the source code defined in the job’s SCM configuration. Question 47. Which of the following best describes a “shared library” in Jenkins?