6.0 Automation
Git & CI/CD Pipelines Practice Questions
Version control with Git and CI/CD pipeline concepts for network automation.
One solved question, so you can see how these are marked
Which Git command records staged local code modifications into the repository history alongside a descriptive log message?
git commit -m "Message"
git commit -m "Message" takes staged changes (added via git add) and saves them as a snapshot in the local Git repository commit history.
Every question in the set below is marked like this. The answers stay hidden until you pick one.
All 5 Git & CI/CD Pipelines questions in this set
Answers and explanations appear when you work through the set above.
In a modern DevOps/DevNet CI/CD pipeline, which tool serves as a distributed Version Control System (VCS) to track code changes and trigger build automation pipelines?
- Docker
- Git
- Jenkins
- Postman
Which Git command creates a new isolation branch named feature-qos and immediately switches your active working context to that branch?
- git branch feature-qos
- git checkout -b feature-qos
- git commit -am "feature-qos"
- git merge feature-qos
In an automated DevNet deployment pipeline, what is the role of Continuous Integration (CI)?
- Manually configuring access switch ports from a terminal console after each change window is approved.
- Automatically building, linting, and running tests against every change committed to the repository.
- Replacing faulty router hardware in the data center as soon as monitoring raises a hardware alarm.
- Assigning static IP addresses to new virtual machines from a spreadsheet kept in the repository.
What is the correct sequence of Git commands to stage local code changes, record them into the local repository, and push them to a remote central repository branch?
- git push origin main -> git commit -m "msg" -> git add .
- git add . -> git commit -m "msg" -> git push origin main
- git init -> git pull origin main -> git clone <url>
- git fetch origin -> git commit -m "msg" -> git merge origin/main
In an automated Infrastructure as Code (IaC) CI/CD pipeline, what role does a Git Webhook perform?
- It encrypts the passwords stored in local Git configuration files before they are committed to the repository.
- It sends an HTTP POST to the CI/CD server (for example Jenkins or GitLab CI) on each push, triggering the pipeline.
- It converts Python automation scripts into IOS XE CLI commands before they are pushed to the network devices.
- It polls each network device over SSH every minute and commits any running-config change back into Git.