AlgoMaster Logo

CI/CD Integration - Quiz

1 min readUpdated December 2, 2025
Listen to this chapter
Unlock Audio

CI/CD Integration Exercises

30 quizzes

1
Code Completion

Trigger a CI pipeline in GitLab by pushing a new commit to the main branch

shell
1
git origin main

Click an option to fill the blank:

2
Code Completion

Fetch the latest pipeline configuration and code from the default remote before a deployment

shell
1
git origin

Click an option to fill the blank:

3
Code Completion

Stage changes to a GitHub Actions workflow file so they are included in the next commit

shell
1
git .github/workflows/ci.yml

Click an option to fill the blank:

4
Code Completion

Create a new branch for experimenting with a different deployment strategy

shell
1
git deployment-canary

Click an option to fill the blank:

5
Code Completion

Switch to the Jenkins integration branch before editing the Jenkinsfile

shell
1
git jenkins-integration

Click an option to fill the blank:

6
Multiple Choice

In a CI/CD pipeline, what is the primary purpose of the 'build' stage?

7
Multiple Choice

In GitHub Actions, what file location is used to define workflows?

8
Multiple Choice

What triggers a GitLab CI pipeline by default when using .gitlab-ci.yml?

9
Multiple Choice

In a CI pipeline focused on automated testing, which tests typically run first?

10
Multiple Choice

Which deployment strategy minimizes downtime by switching traffic between two identical environments?

11
Sequencing

Order the steps to add a GitHub Actions workflow that runs tests on each push.

Drag and drop to reorder, or use the arrows.

12
Sequencing

Order the steps to run a full CI pipeline in GitLab after updating tests.

Drag and drop to reorder, or use the arrows.

13
Sequencing

Order the steps to integrate a Jenkins pipeline with a Git repository.

Drag and drop to reorder, or use the arrows.

14
Sequencing

Order the steps for a canary deployment using a CI/CD pipeline.

Drag and drop to reorder, or use the arrows.

15
Output Prediction

You are on branch feature/github-actions. What does this command print?

1git branch --show-current
16
Output Prediction

The last commit you made was 'Add GitLab CI config'. What does this show?

1git log -1 --pretty=%s
17
Output Prediction

Your HEAD is at tag v2.0.0 used for a production deployment. What does this print?

1git describe --tags --exact-match
18
Output Prediction

You created a branch named jenkins-ci earlier and are currently on it. What is printed?

1git rev-parse --abbrev-ref HEAD
19
Bug Spotting

Find the incorrect command in this GitHub Actions workflow update sequence.

Click on the line(s) that contain the bug.

shell
1
git checkout main
2
git pull origin main
3
git checkout -b ci-update
4
nano .github/workflows/ci.yml
5
git add .github/workflows/ci.yml
6
git commit "Update CI workflow"
7
git push origin ci-update
20
Bug Spotting

Find the incorrect command in this GitLab CI configuration commit workflow.

Click on the line(s) that contain the bug.

shell
1
git checkout -b gitlab-ci-setup
2
nano .gitlab-ci.yml
3
git add .gitlab-ci.yml
4
git commit -m "Add GitLab CI"
5
git push origin .gitlab-ci.yml
21
Bug Spotting

Find the incorrect command in this Jenkinsfile change workflow.

Click on the line(s) that contain the bug.

shell
1
git checkout main
2
git pull origin main
3
git checkout -b jenkins-pipeline
4
nano Jenkinsfile
5
git add Jenkinsfile
6
git commit -m "Update Jenkins pipeline"
7
git push jenkins-pipeline origin
22
Matching

Match each CI/CD concept with its primary purpose.

Click an item on the left, then click its match on the right. Click a matched item to unmatch.

23
Matching

Match each CI platform with its configuration file location.

Click an item on the left, then click its match on the right. Click a matched item to unmatch.

24
Matching

Match each automated test type with what it primarily validates.

Click an item on the left, then click its match on the right. Click a matched item to unmatch.

25
Fill in the Blanks

Complete the commands to prepare and share a blue-green deployment branch.

shell
1
git checkout
2
git pull origin
3
git push origin

Click an option to fill blank 1:

26
Fill in the Blanks

Complete the commands to rebase a feature branch with updated CI tests.

shell
1
git checkout
2
git fetch
3
git rebase

Click an option to fill blank 1:

27
Fill in the Blanks

Complete the commands to commit and push an updated Jenkinsfile.

shell
1
git add
2
git commit -m
3
git push ci-jenkins

Click an option to fill blank 1:

28
Hotspot Selection

Click the line that shows the current branch used for the main CI pipeline.

Click on the line to select.

shell
1
  canary-release
2
* main
3
  blue-green
4
  jenkins-experiments
29
Hotspot Selection

Click the line that indicates a modified GitHub Actions workflow file.

Click on the line to select.

shell
1
 M .github/workflows/ci.yml
2
 M src/app.js
3
?? scripts/deploy.sh
30
Hotspot Selection

Click the line showing the commit that added automated tests.

Click on the line to select.

shell
1
commit a1b2c3d4
2
Author: Dev <dev@example.com>
3
Date:   ...
4
 
5
    Initial project setup
6
 
7
commit e5f6a7b8
8
Author: Dev <dev@example.com>
9
Date:   ...
10
 
11
    Add automated tests