Get All Weeks Continuous Integration and Continuous Delivery (CI/CD) Quiz Answers
Table of Contents
Continuous Integration and Continuous Delivery (CI/CD) Quiz Answers
Module 1 – Graded Quiz: Introduction to CI/CD week 1 quiz answer
Q1. What is Continuous Delivery (CD)?
- An automation process with which you can continuously push changes to production
- An automation process with which you can integrate your work into your repository
- An automation process with which you can prepare code for release and deploy the code to an environment
- An automation process with which you can receive instant notifications if the application or infrastructure fails
Q2. Which component of a DevOps pipeline consists exclusively of the Release, Deploy, and Operate phases?
- Continuous Integration
- Continuous Delivery
- Continuous Monitoring
- Continuous Alerting
Q3. Which aspect of development is reduced by using Continuous Integration and Continuous Delivery (CI/CD)?
- Quality assurance
- Integration risk
- Up-front costs
- Monitoring requirements
Q4. What is an important consideration when using DevOps pipeline tools?
- That all teams use different tools
- That all teams use the same tools
- That the tools automate processes
- That the tools slow down processes
Q5. Which tool is a hosted Continuous Integration (CI) service that helps developers build and test software projects hosted on GitHub and Bitbucket?
- DockerHub
- Kubernetes
- Using Infrastructure as Code (IaC), how should developers approach provisioning infrastructure?
- Provision the infrastructure manually.
- Create self-modifying code that dynamically provisions.
- Provide instructions in a textual format like YAML.
- Modify settings of similar infrastructure and reprovision.
Q6. Which Infrastructure as Code (IaC) approach requires you to define the specific order of commands needed to achieve the desired state?
- Imperative
- Interrogative
- Exclamatory
- Declarative
Q7. Which file type contains a list of servers or devices that an Infrastructure as Code (IaC) tool uses to provision infrastructure?
- Executable
- Inventory
- Publishing
Q8. What is the benefit of Infrastructure as Code (IaC)?
- Improved buy-in from stakeholders
- Reduced complexity of code
- Reduced length of scripts
- Improved use of developers’ time
Q9. Which Infrastructure as Code (IaC) tool uses a declarative, or automatic, approach with a pre-execution check to ensure that the tool achieves the desired result?
- Ansible
- Terraform
- SaltStack
Module 2 – Graded Quiz: Continuous Integration (CI)
Q1. What is one benefit of Continuous Integration (CI)?
- CI ensures that the main branch is always deployable.
- CI decreases the number of development stages required.
- CI moves the code into production automatically.
- CI reduces drift between feature and main branches.
Q2. Why does Continuous Integration (CI) reduce code integration risk?
- CI reduces the reaction time for code changes.
- CI uses more precise tools to test code changes.
- CI produces code changes automatically.
- CI involves smaller code changes that are easier to review.
Q3. What is the first step of social coding?
- Discuss a new feature with the repo owner.
- Open an issue and assign it to yourself.
- Issue a pull request and await feedback.
- Fork the repo, create a branch, and make changes.
Q4. Why is Git valuable for DevOps?
- It provides centralized version control.
- It enables non-linear collaboration.
- It tests pending code updates.
- It improves client-developer communication.
Q5. When starting development on a new feature for a Git project, what should you do first?
- Issue a pull request.
- Use the git fetch command.
- Delete your working directory.
- Check out the main branch.
Q6. In the pull request workflow, what should you do after pulling changes from the main branch to your local workspace?
- Merge the changes into the local branch.
- Issue a pull request for your team to review.
- Commit changes to the main branch.
- Push the local branch to the remote repository.
Q7. With Travis CI, what type of file must you use to define the instructions for your Continuous Integration (CI) pipeline?
- JSON
- CSV
- YAML
- ODF
Q8. What does a job do in a GitHub Actions workflow?
- It triggers a workflow run.
- It performs a single low-level task.
- It executes steps within a runner.
- It runs a workflow when prompted.
Q9. What is one keyword you can use to set up a GitHub Actions event?
- checkout
- release
- apply
- mergetool
Q10. In GitHub Actions, what does the ‘needs’ keyword do?
- It states which users require access to the GitHub token.
- It prohibits a job from executing unless a particular condition is met.
- It guarantees that only a single job will run at one time.
- It lists jobs that must run before the job with this keyword.
Module 3 – Graded Quiz: Continuous Delivery (CD)
Q1. What is the benefit of Continuous Delivery (CD)?
- Increases development budget
- Refactors unit code
- Decreases project size
- Reduces deployment time
Q2. According to the key principles of Continuous Delivery (CD), what should you do if a build breaks?
- Save the problem for quality assurance.
- Determine how the system failed.
- Assign blame to a developer.
- Extend the project’s deadlines.
Q3. What is a best practice for Continuous Delivery (CD)?
- Use long-lived repository branches when possible.
- Ensure ample downtime between releases.
- Deploy software updates to production continually.
- Include user documentation for each change.
Q4. Which scanning capability should you have within your Continuous Delivery (CD) pipeline?
- Secret
- Compatibility
- Plagiarism
- Deployment
Q5. In Tekton, what does TaskRun do?
- Defines locations for the inputs and outputs of steps
- Creates a Kubernetes pod for each task
- Stores data for sharing between tasks
- Instantiates a pipeline with parameters
Q6. In a Tekton task manifest, what syntax must you use to pass a parameter into a step?
- $~<variable-name>~
- $(<variable-name>)
- [<variable-name>]
- “<variable-name>”
Q7. Which subfield must you include within the spec field of a Tekton EventListener definition?
- serviceAccountName
- description
- generateName
- podTemplate
Q8. Assume you want to use the git-clone task from the Tekton Catalog. You have a Tekton PersistentVolumeClaim named pipelinerun-vc and a PipelineRun defined as follows:
- apiVersion: tekton.dev/v1beta1kind: PipelineRun
- metadata: generateName: pipeline-mn-
- spec: pipelineRef: name: ab-pipeline
- workspaces: – name: pipeline-xy persistentVolumeClaim: claimName: pipelinerun-vc
- params: – name: repo-url value: “$(tt.params.repo)”
Q9. In the pipeline’s spec section, what name must you give the workspace so that any tasks that need it can use it?
- pipeline-xy
- pipelinerun-vc
- pipeline-mn-
- ab-pipeline
Q10. Where should you define an environment property that you want to add to a Tekton task?
- Pipeline’s params field
- Task’s steps field
- Pipeline’s results field
- Task’s workspaces field
Q11. How can you deploy an application to an environment when using Tekton?
- Apply manifests in YAML format.
- Use the ‘tkn resource describe’ command.
- Use the ‘odo service create’ command.
- Apply manifests in CSV format.
Final Exam
Q1. Which component of a DevOps pipeline consists exclusively of the Plan, Code, Build, and Test phases?
- Continuous Delivery
- Continuous Monitoring
- Continuous Integration
- Continuous Alerting
Q2. Which tool is a Continuous Integration and Continuous Delivery (CI/CD) platform that performs CD deployments and contains workflow definitions inside a YAML file?
- Jenkins
- OpsGenie
- Marathon
- CircleCI
Q3. What is one benefit of Infrastructure as Code (IaC)?
- Fewer developers to hire
- Lower requirements for code readability
- More concise scripts
- Quicker time to production
Q4. Why does Continuous Integration (CI) lead to higher-quality code?
- Coordinated coding and deployment
- Extensive sessions for developing
- Constant review and testing
- Superior tools for code validation
Q5. What is social coding?
- A test-first approach to application design
- An open-source approach to enterprise code
- A software development approach to project management
- An iterative, sequential approach to content creation
Q6. Which Git command should you use to undo a commit to your local repository but keep the changes in the staging area?
- git pull –edit
- git diff –no-patch
- git clean –quiet
- git reset –soft
Q7. Assume you are working on a Git project and want to develop a new feature. After pulling all the repository’s latest code to your local workspace, what should you do next?
- Reset recent edits.
- Create a new branch.
- Commit your changes.
- Open a pull request.
Q8. What does an event do in a GitHub Actions workflow?
- Triggers a workflow run
- Runs a workflow when prompted
- Performs a single low-level task
- Execute steps within a runner
Q9. In GitHub Actions, which keyword is helpful for using the output of one step as the input for another step?
- env
- needs
- id
- name
Q10. What is the benefit of Continuous Delivery (CD)?
- It reduces the drift between the feature and main branches.
- It corrects code errors instantly and more precisely than other approaches.
- It automates software’s movement through the development lifecycle.
- It communicates all project updates to clients for you.
Q11. According to the key principles of Continuous Delivery (CD), what should developers spend their time on?
- Performing repetitive tasks
- Solving coding problems
- Talking with clients
- Assembling cost estimates
Q12. What is the best practice for Continuous Delivery (CD)?
- Comment in the source code.
- Build in the staging environment.
- Develop at each team member’s pace.
- Release at the granularity of the test.
Q13. In Tekton, what does TriggerBinding do?
- It details a blueprint for the pipeline that should run when an event occurs.
- It declares a storage class for the Persistent Volume in the pipeline.
- It specifies what happens when the EventListener detects an event.
- It captures the required event parameters for running the pipeline.
Q14. In a Tekton task manifest, what is one way to pass a parameter to a task?
- List the parameter name as a step argument.
- Include the parameter in the ‘kubectl apply’ command.
- Describe the parameters within the pipeline specifications.
- Add the parameter as a command line option.
Q15. Assume you have four Tekton tasks within a pipeline: task-a, task-b, task-c, and task-d. How could you make task-a and task-b run in parallel?
- Include the runAfter field in both tasks and then specify task-c as the value for both runAfter fields.
- Include the runAfter field in both tasks and then specify task-a as the value for both runAfter fields.
- Include the form field in task-b, and then specify task-a as the value in this field.
- Include the form field in task-c and task-d, and then specify task-a as the value for both form fields.
Get All Course Quiz Answers of IBM DevOps and Software Engineering Professional Certificate
Introduction to DevOps Coursera Quiz Answers
Introduction to Cloud Computing Coursera Quiz Answers
Introduction to Agile Development and Scrum Quiz Answers
Hands-on Introduction to Linux Commands and Shell Scripting Quiz Answers
Python for Data Science, AI & Development Quiz Answers