Clutch

Continuous integration and delivery with Github, Gitflow and Jenkins

Continuous integration and delivery with Github, Gitflow and Jenkins
Average rating: 0
(0 votes)

Collection of rules for development, continuous integration, QA and deploy with Github, Gitflow, and Jenkins we use in one project with 5 teams distributed across 4 locations and developing Ruby on Rails backend for native mobile apps. Syndicode created step-by-step guide below.

Gitflow trivia

  • master – branch that corresponds to the current production code
  • develop – development integration branch – latest integrated development code
  • feature/123-some-text – individual feature-branch being developed by developer where 123 is GitHub issue number
  • bugfix/123-some-text – individual bugfix-branch being developed by developer where 123 is GitHub issue number
  • release/1.0.1 – release candidate branch being tested and under feature-freeze
  • hotfix/123-text – hotfix branch being developed where 123 is GitHub issue

Development routine

New feature

  • Git checkout develop
  • Git pull origin develop
  • Git checkout -b feature/123-my-feature

Commit to new feature

  • Git commit -am “#123 my feature increment”

Finish feature

  • git push -u origin feature/123-my-feature
  • Jenkins job runs autotests in this individual feature after any new push. If successful it marks commits as successful.
  • Create pull request in GitHub to *develop *branch
  • Jenkins job runs autotest in the result of the merge of the feature/123-my-feature to develop. If successful it marks PR with the label.

Code review

  • Labels and code review in GitHub until feature is ready plus labels from Jenkins
  • PR of feature is merged to develop *and *feature/123-my-feature is removed in GitHub

Deploy of ‘develop’

  • Jenkins job tests *develop * after every change
  • Jenkins job deploys the latest *develop * to Staging if testing was success

Find more about Continuous Integration with Jenkins Pipeline

Releasing routine

New release candidate

  • Git checkout develop
  • Git pull origin develop
  • Git checkout -b release/1.0.1
  • Git push origin release/1.0.1

Bugfixing

Described below as separate routine.

Release

  • Create pull request from release/1.0.1 to master
  • Jenkins job runs autotests of result of merge from release/1.0.1 to master
  • If tests pass merge PR into master on GitHub
  • Make release tag for the master in GitHub
  • Create and merge pull request from master to develop
  • Delete release/1.0.1 branch

Bug fixing routine (QA run manual tests)

  • Git checkout release/1.0.1
  • Git pull origin release/1.0.1
  • Git checkout -b bugfix/123-my-fix

Commit to new bugfix

Git commit -am “#123 my fixincrement”

Finish fix

  • Git push -u origin bugfix/123-my-fix
  • Jenkins job runs autotests in this individual bugfix after any new push. If successful it marks commits as successful.
  • Create pull request in github to release/1.0.1 branch
  • Optionally create pull request from bugfix/123-my-fix to develop
  • Jenkins job runs autotest in the result of merge of the bugfix/123-my-fix to release/1.0.1. If successful it marks PR with the label.

Code review

  • Labels and code review in GitHub until fix is ready plus labels from Jenkins
  • PR of fix is merged to release/1.0.1 (and to develop) and bugfix/123-my-fix is removed in github

Deploy of pre-prod

  • Jenkins job tests release/1.0.1 after every change
  • Latest release/1.0.1 deployed manually to pre-prod if autotesting was success
  • Load tests and end-to-end tests with mobile clients

 

Explore next Gitflow links

Rate this article, if you like it

Thanks! You’ve rated this material!

Got a project? Let's discuss it!

*By submitting this form you agree with our Privacy Policy.

Mailing & Legal Address

Syndicode Inc. 340 S Lemon Ave #3299, Walnut CA, 91789, USA

Visiting & Headquarters address
Kyiv Sofiivska 1/2a, 01001, Kyiv, Ukraine
Dnipro Hlinky 2, of. 1003, 49000, Dnipro, Ukraine
Email info@syndicode.com
Phone (+1) 9035021111