DevOps / Gitlab Interview questions
How does GitLab's Auto DevOps decide which CI/CD template to apply to a project?
Auto DevOps relies on Herokuish-style buildpack detection: when a pipeline runs, the build stage inspects the repository for language-specific marker files (like package.json for Node.js, Gemfile for Ruby, or requirements.txt/pyproject.toml for Python) and selects a matching buildpack automatically, without the project declaring its language anywhere in .gitlab-ci.yml.
If the repository already includes a Dockerfile, Auto DevOps skips buildpack detection entirely and builds from that Dockerfile instead, since an explicit Dockerfile is treated as the project stating exactly how it wants to be built. Once an image is produced, the same Auto DevOps templates handle the rest of the pipeline generically: running tests if a test command is detected, applying SAST/dependency scanning regardless of language, and deploying to Kubernetes using the chart Auto DevOps provides (or a custom Helm chart if the project supplies one).
This detection happens fresh on every pipeline run rather than being cached as a fixed setting, so switching a project's stack, or adding a Dockerfile, changes what Auto DevOps does on the very next push.
More Related questions...