the goal was to upgrade a production app from rails 4 to rails 6 in phases, slowing taking over workers and endpoints. this meant i had rails 4 and rails 6 in production in parallel. in a perfect world, the master branch would freeze, you could take your time deploying rails 6, and everything is hunky dory. too bad we don't live in the real world, and the master branch is always moving, regardless on how much you plan for it.
i utilized gitenvs to constantly maintain a production-rails6
environment
the configuration above in layman's terms:
master
branchproduction-rails6
i added two branches to the environment, which were rails6.0-stable
and rails6.0-config
.
rails6.0-stable
was the rails 6 upgraderails6.0-config
had custom configuration that i didn't want to commit into the rails6.0-stable
the screenshot above was created by using the slack integration, and inputting the command /gitenvs status production-rails6
as the developer(s) pushed changes to rails6.0-stable
, gitenvs would build and push the
production-rails6
environment by merging the rails6.0-stable
, and
rails6.0-config
on top of master
once the branch production-rails6
was built, the ci (bitbucket pipelines) ran the specs, and deployed the code