DevOps / Gitlab Interview questions
Explain the execution flow of a GitLab CI/CD pipeline from commit to deployment?
When a developer pushes a commit, GitLab checks the repository for a .gitlab-ci.yml file and, if found, creates a pipeline made up of the stages and jobs defined there. GitLab then looks for an available Runner tagged to accept each job.
Each stage only starts once every job in the previous stage succeeds, unless allow_failure or a DAG-style needs relationship changes that ordering. Artifacts produced by earlier jobs, like a compiled binary or built image, can be passed forward to later jobs (such as deploy) without rebuilding them. The final status, pass or fail, is reported back onto the commit and any associated merge request, which is what blocks or allows a merge depending on the project's rules.
More Related questions...