Welcome to JiKe DevOps Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
861 views
in Technique[技术] by (71.8m points)

continuous integration - Git Branches & Environments Development Process for CI/CD


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

Please log in or register to answer this question.

1 Answer

0 votes
by (71.8m points)

I understand this is opinion based and may not be the correct answer for everyone/situation. (Thank you to @adam for the mention of git-flow.)

The environments:

  • production
  • staging
  • dev

Staging is intended to be a stable release/environment that can be deployed to master at any point in time. Dev is the QA and dev environment before staging.

Git branches:

  • master (production)
  • staging
  • dev
  • feature/[name] bugfix/[name] etc. (follows git-flow pattern)

The development process/flow: A developer is assigned a ticket. The developer checks out a new feature/bugfix branch from staging branch. The developer does hiser work on the feature/bugfix branch and MR/PR's into dev branch so it can be QA'd in the dev environment. Once the ticket passes QA, the developer opens an MR/PR with feature/bugfix -> staging. After the feature/bugfix is merged into staging it can be discarded.

Housekeeping needs to be kept up to date on the branches, regularly - most importantly, dev needs to rebase on staging often to keep the QA environment healthy and up to date.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to JiKe DevOps Community for programmer and developer-Open, Learning and Share
...