Every merge to main should produce a unique semantic version automatically.
IntermediateScenarioBuilds, Artifacts, Nexus, SonarQube and Testing
Answer
Situation read → Versioning without manual edits.
What I'd do →
- Adopt Conventional Commits and a tool like
semantic-releaseorrelease-pleaseto compute the next version from commit types. - Tag, publish the artifact and create release notes in the same pipeline.
- For services, also tag images with
<semver>and the commit SHA.
Why → Version numbers become a function of history, removing human error.
Interview tip → Squash-merge with a good PR title keeps commit-based versioning clean.
More on Builds, Artifacts, Nexus, SonarQube and Testing
A Maven project resolves dependencies from Maven Central on every build and a left-pad style outage would stop all builds.BeginnerYou must publish snapshot and release artifacts without overwriting a released version.IntermediateAn npm build is non-reproducible: different versions install on different days.BeginnerThe SonarQube quality gate must block merging PRs that add new bugs, vulnerabilities or uncovered code.IntermediateCoverage shows 0% in SonarQube although tests run in CI.IntermediateA big legacy codebase fails every Sonar gate. Teams ignore the tool. How do you adopt it?Intermediate