How to promote commits in my deployment model?

Hi experts,

I’m working on a Looker deployment model with three instances, each of which points to a git repo branch:

Looker-dev → dev branch

Looker-stg → staging branch

Looker-prd → main branch (production)

The needs are:

  • Looker development should be able to deploy on production ASAP (i.e. no releasing branches)
  • BI developers can ONLY go into development mode in Looker-dev
  • Looker-prd is protected by human reviewers
  • Looker-stg is protected by automated tests

BI developers create feature branches from dev branch and merge into dev branch when development is done. I want them to merge the exactly same feature branches into staging (for more tests) and main branch for deployment. The merge into staging should be automatic with some tests/validation.

However, because the dev branch is a volatile sandbox (Looker developers sometimes break the environment but we can reset it), it doesn’t make sense, or even possible to merge a feature branch (which contains all garbage from dev branch) into staging/production branch. And if they are to create feature branches from staging/production, the dev branch as well as the Looker-dev instance are useless, because they cannot create feature branches based on staging/production while using the Looker-dev instance.

I have a few solutions:

  1. BI developers still create feature branches based on dev branch. Instead of merging feature branches into staging/production, we cherry pick them in github.
    1. Pros: Looks like the solution that introduces minimum amount of external tools needed
    2. Cons: Since cherry pick is non-trivial and some BI developers never heard about it, the merge from feature branch into staging is going to be manually done by us (the Admin team). Github web UI does not support cherry pick so we have to use desktop version
  2. BI developers still create feature branches based on dev branch. But the promotion to staging and production is to be completed by calling the webhook of each instance with advanced deploy turned on.
    1. Pros: BI developer doesn’t need to worry about anything running in background
    2. Cons: I don’t even know if it works or not. Just tried out but didn’t work for me (I was trying to deploy a commit from dev into staging). Also have no idea if it can be automated
  3. BI developers create feature branches based on staging/prod. But then dev is going to be useless.

Can you please advise me which one is the best according to my needs? Thank you!

0 0 143