INTERVIEW PREP
Interview questions
570 questions from real DevOps, SRE, platform engineering and MLOps interviews, with the answer an interviewer wants to hear. Try answering out loud first, then open the model answer.
Showing 31–45 of 109 questions
31.What is static analysis?BeginnerSonarQube & Code Quality
It reads source code and finds known problem patterns without running the program. It is fast and safe, and works next to tests and code review.
32.What is a quality gate?BeginnerSonarQube & Code Quality
A pass or fail rule made of conditions, such as no new bugs and at least 80% coverage on new code. If a condition fails, the gate fails and the pipeline can stop.
33.What is the difference between a bug, a vulnerability and a code smell?BeginnerSonarQube & Code Quality
A bug is code that will probably behave wrongly. A vulnerability is code an attacker could abuse. A code smell works but is hard to read or change.
34.What does the scanner do, and what does the server do?BeginnerSonarQube & Code Quality
The scanner reads your code and sends a report. The server stores the results, applies the rules and decides if the quality gate passes.
35.Why does SonarQube need a database like PostgreSQL?BeginnerSonarQube & Code Quality
It stores every analysis, issue and setting. The built-in test database is only for evaluation and cannot be upgraded.
36.What is an artifact repository and why use one?BeginnerJFrog Artifactory & Nexus
It stores files that builds make and use, such as packages and images, with versions. It gives you one safe place, a cache of public libraries, access control and a record of what was built. Builds become faster and repeatable.
37.What does 'build once, deploy many' mean?BeginnerJFrog Artifactory & Nexus
You build an artifact one time and move that same file through dev, test and prod. You never rebuild for production, because a rebuild may differ from what you tested.
38.What are local, remote and virtual repositories?BeginnerJFrog Artifactory & Nexus
Local holds your own files. Remote caches another site such as Maven Central. Virtual gives one address in front of both, so tools need only one URL.
39.What is the difference between a release and a snapshot version?BeginnerJFrog Artifactory & Nexus
A release such as 1.4.2 is fixed and should never be overwritten. A snapshot such as 1.5.0-SNAPSHOT is work in progress and is replaced by each build. Keep them in separate repositories.
40.Why should passwords not go in pom.xml?BeginnerJFrog Artifactory & Nexus
The pom is committed to Git, so secrets would leak. Put credentials in settings.xml or in CI variables, and use tokens.
41.What is the difference between a pipeline, a stage and a job?BeginnerGitLab CI/CD
A job is a list of commands that runs in a fresh environment and passes or fails. A stage is a group of jobs that run at the same time. A pipeline is one run of all the jobs for one commit. Stages run in order, and the next stage starts only when every job in the stage before it passed.
42.What is a GitLab runner?BeginnerGitLab CI/CD
A program that runs the jobs. It connects out to GitLab, asks for work, runs each job (usually in a Docker container or a Kubernetes pod) and sends back the log and artifacts. GitLab.com gives you shared runners; companies often run their own for speed, cost, special hardware or access to private networks.
43.What is the difference between artifacts and cache?BeginnerGitLab CI/CD
Artifacts pass a job's results (like a dist/ folder or a test report) to later jobs, and they must be there. Cache keeps downloaded packages (like .npm/) between pipelines to save time, and it may be missing. If a job would be wrong without the files, use artifacts; if it would only be slower, use cache.
44.How do you keep secrets out of your pipeline code?BeginnerGitLab CI/CD
Store them as CI/CD variables in Settings, marked masked (hidden in logs) and protected (only given to protected branches). Never commit them. For cloud access, prefer short-lived OIDC tokens (id_tokens) or a secret manager like Vault, so nothing long-lived is stored at all.
45.What is a merge request, and what happens when you write 'Closes #12' in one?BeginnerGitLab CI/CD
A merge request asks to merge one branch into another. It shows the changes, the pipeline result, approvals and security findings. 'Closes #12' links issue #12 and closes it automatically when the MR is merged into the default branch.