When Should I Bump Versions and Build Images for Dev and Prod?

0
6
Asked By CreativeFox99 On

Hey everyone! I'm trying to wrap my head around how to manage version bumping and building in a workflow that includes both development and production branches. I want to ensure that we're releasing images correctly to both environments. I've come across different suggestions online involving tools like Commitizen or Semantic Release for automated versioning, but I'm confused about the best place to do this – should it be in the dev branch or the prod branch? And once we build an image in dev, should we use that same image in production, or is it better to build a fresh image for production? How do you all handle this?

4 Answers

Answered By ContinuousDevPro On

I use GitVersion to auto-generate version numbers based on commit rules. When I commit, it creates a prerelease version. After successful testing, tagging the commit triggers a new build with the release version for deployment. Sometimes it's helpful to avoid rebuilding if your pipeline is lengthy, but in other cases, rebuilding is easier, especially for things like NuGet packages where embedded versions matter.

Answered By DevGuru85 On

You actually don't need separate images for dev and prod. Just build one image for both environments and deploy that same image everywhere. As for where to bump the version, do it in one consistent place. Check out resources like 12factor.net and minimumcd.org for more insights.

SmartCoder42 -

Absolutely! Sticking to one image reduces complexity. Those resources are solid for understanding best practices!

Answered By ReleaseNinja77 On

It's a bit of a situational thing, but I'd recommend sticking with Semantic Release. It's well-documented and offers a straightforward path for managing releases. Personally, I use the main branch as our dev branch, and once we merge into it, that triggers a build and we tag based on commits. After we test in dev, we manually kick off our release process which creates a finalized image for production.

Answered By VersionMaster21 On

The timing for cutting a release really does depend on your workflow. I like to create a release candidate from the develop branch, push it to test, let the testers do their thing, and then promote it to production once we're confident everything's solid. Just make sure whatever process you choose, it's consistent across your team.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.