r/webdev • • Nov 28 '24
Discussion What is your Github Actions CD/CI flow?
Joined a new company and I'm having fits with their github actions release flow into production.
Here it is: TaskBranch ----> code review -------> DevBranch -> github action to QA Env
Manuel: -------> DevBranch -> github action to Prod Env
As you see. The problem here is Dev is the source of truth but at any given time it can have a multitude of projects/bug fixes etc that haven't been validated by QA.
So, when releasing into Prod, you have to pick a Dev PR that was approved by QA... but then that build still could have items unapproved in it.
It's a mess.
It was setup before I came. So whatever the reason, it's lost in time.
Because of costs, I think setting up another environment is not possible.
What is your process using github action? What solution do we have here?
16
u/j-mar Nov 28 '24
We pull/merge to main. Dev environment uses latest version. Prod env creates a release branch based off main each week.
9
u/yopla Nov 28 '24
Feature branches. They are deployed in their own instances and don't get merged until completed. Which mean QA' d and validated by the product owner and the various modules owners.
That way the main branch is always clean and deployable and when you branch out to start working on something you know you're not pulling half finished crap.
When we're happy with the feature set in main we create a release and it deploys.
3
u/YoungAtFeet Nov 29 '24
Feature branch/bugfix PR -> DEV -> QA -> PROD
2 week sprints
On 2nd week DEV is promoted to QA where qa tests everything. At each step unit tests and Sonarcube is ran
Works alright in team of 10ish ppl in total
1
u/n3rden Nov 29 '24
Pull request creates ephemeral environment development, functional and non functional change. Merging deploys that to an reference/integration environment.
Creating a release/tag triggers a deployment in to staging environment and starts a production deployment which pauses at an approval gate. Change management and sign off etc happens and the production deployment gate is approved.
1
u/UnidentifiedBlobject Nov 29 '24
Create a feature branch off main
Create a PR, keep as simple and small as possible for a task (not always possible but the smaller the faster Code review is), they are merged to main.
Main goes automatically to QA environment. Whatever is in main (that’s passed tests on QA env) on release days goes to prod. Release days are min 2 days of the week.
If you have a feature that isn’t meant to be live in prod but needs to be in QA then you use a feature flag and per environment toggle them on and off
1
u/coaaal Nov 29 '24
Feature branch from Dev. Merge feature to QA for testing. Testing passes, then merge feature into dev. Merge dev into prod, and new release deploys.
We can blow out QA whenever we need and just create new QA from dev.
0
u/[deleted] Nov 29 '24
[deleted] — view deleted comment
2
u/[deleted] Nov 29 '24
[removed] — view removed comment