nerdexam
Cisco

200-901 · Question #595

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…

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.

Software Development and Design

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

How the community answered

(22 responses)
  • A
    5% (1)
  • B
    5% (1)
  • D
    91% (20)

Why each option

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.

Agit commit

`git commit` records changes in the local repository but does not interact with the remote server or initiate any CI/CD processes.

Bgit test

`git test` is not a standard Git command; testing is typically handled by the CI/CD pipeline itself after a push.

Cgit fetch

`git fetch` downloads changes from the remote repository to the local repository, but it does not send local changes or trigger CI/CD pipelines.

Dgit pushCorrect

In modern CI/CD workflows, especially with platforms like GitLab, a `git push` command sends the local commits to the remote repository. This action is configured to trigger the CI/CD pipeline, which then executes automated tests and other defined stages.

Concept tested: Git CI/CD pipeline triggers

Source: https://docs.gitlab.com/ee/ci/pipelines/pipeline_triggers.html

Topics

#Git#CI/CD#Version Control#Automated Testing

Community Discussion

No community discussion yet for this question.

Full 200-901 Practice