200-901 · Question #595
200-901 Question #595: Real Exam Question with Answer & Explanation
The correct answer is D: git push. To trigger a CI/CD pipeline and run automated tests after modifying code in a Git repository, the engineer must push the committed changes to the remote repository.
Question
An engineer clones a repository that contains a Python script from GitLab to a laptop. After modifying the code, the engineer wants to validate the changes. Which command starts the CI/CD pipeline and runs the automated tests?
Options
- Agit commit
- Bgit test
- Cgit fetch
- Dgit push
Explanation
To trigger a CI/CD pipeline and run automated tests after modifying code in a Git repository, the engineer must push the committed changes to the remote repository.
Common mistakes.
- A.
git commitrecords changes in the local repository but does not interact with the remote server or initiate any CI/CD processes. - B.
git testis not a standard Git command; testing is typically handled by the CI/CD pipeline itself after a push. - C.
git fetchdownloads changes from the remote repository to the local repository, but it does not send local changes or trigger CI/CD pipelines.
Concept tested. Git CI/CD pipeline triggers
Reference. https://docs.gitlab.com/ee/ci/pipelines/pipeline_triggers.html
Topics
Community Discussion
No community discussion yet for this question.