Advertisement
Guest User

Untitled

a guest
Jan 28th, 2020
168
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.25 KB | None | 0 0
  1. This document describes how our code changes make it from our IDEs to production. This includes managing changes in JIRA and code in Git. The plan is inspired by both [GitFlow](https://www.atlassian.com/git/tutorials/comparing-workflows#gitflow-workflow) and [GitHub Flow](https://guides.github.com/introduction/flow/).
  2.  
  3. ## Master and develop branches
  4. Each of our git repos has two branches that we never close: master and develop.
  5. The master branch contains our production code. When we merge code from release and hotfix branches to master, we deploy them immediately to production. Master’s commit history tell of releases.
  6.  
  7. As we finish developing new user stories and bug fixes, we merge them back into the develop branch. We immediately deploy these changes to our test environment. We merge feature branches into the develop during the first seven days of the sprint.
  8.  
  9. ![x](https://wac-cdn-a.atlassian.com/dam/jcr:2e2315b0-d79a-403f-a981-4cb94599df1f/02.svg)
  10.  
  11. ## User stories and bug fixes
  12. We create a feature branch for each new user story and bug fix. This allows us to isolate the progress until it is done, and we merge it back into development period.
  13.  
  14. ![x](https://wac-cdn-a.atlassian.com/dam/jcr:9f149cef-f784-43de-8207-3e7968789a1f/03.svg)
  15.  
  16. ### New user stories and bug fixes steps
  17.  
  18. During development period, we do the following steps in git and JIRA.
  19. 1. When we start work on an user story or bug, we
  20. 1. Transition the JIRA issue from OPEN to DEV IN PROGRESS
  21. 1. Create a feature branch from develop branch, using the following naming convention: feature/JIRA ID
  22. 1. Commit changes to the feature branch. For the commit message we can have the following convention: JIRA ID: JIRA task title. If any subsequent commits are needed, we could use the same convention but add a short description of the fix: JIRA ID: JIRA task title - short description of the fix
  23. 1. When the change is ready for code review, we
  24. 1. Transition the JIRA issue from DEV IN PROGRESS to CODE REVIEW
  25. 1. Create a pull request with the JIRA issue ID as the name, and two peers assigned as reviewers
  26. 1. Review the pull request and update the feature branch accordingly
  27. 1. If the code review is more than 500 lines of code or will need more than one hour, the responsible have to allocate time and guide the reviewer through it as peer programming.
  28. 1. When the developers have approved the pull request,
  29. 1. Squash and merge the pull request into the develop branch and close the feature branch
  30. 1. Manually run the migrations in development databases that are not automated by CI
  31. 1. Confirm that CircleCI deployed the change
  32. 1. Transition the JIRA issue from CODE REVIEW to READY FOR QA
  33.  
  34. ## Releases
  35. We create a release branch for each release. We do this on the seventh day of the sprint, when we are ready to regression test the release. When the release branch is opened, a deploy will be made to a staging server from this branch. When bugs are found in the release, we fix them in the release branch, and test them on the staging server. Assuming the release is ready at the end of the sprint, we merge it into master and develop and tag master with a version number. At that point any last-minute changes made on the release will also be available on the develop branch.
  36.  
  37. ![x](https://wac-cdn-a.atlassian.com/dam/jcr:3555a856-675e-453a-b49d-ba60667809e1/04.svg?cdnVersion=fi)
  38.  
  39. ### Release steps
  40. Our process for creating, testing, fixing, and deploying a release are explained below.
  41. 1. End of day 7
  42. 1. Developer creates and merges (squash and merge) pull requests to the development branch for any outstanding features slated for release at the end of the sprint
  43. 1. Developers DO NOT merge any code not slated for release at the end of the sprint
  44. 1. Day 8, 9, and 10
  45. 1. QA tests and creates JIRA issues for each new bug discovered
  46. 1. Developers fix bugs in new branches that will be reviewed and squash and merged in the development branch, at which point fixes end up on staging server
  47. 1. Developer creates a release branch after all features and bugs are QA Done. For example, "release/s30".
  48. 1. After release branch is created, new features can be merged in to development.
  49. 1. Day 12 - Deploy
  50. 1. Developer merges (normal merge) release branch into master and develop
  51. 1. Developer creates a release tag in master. For example, "release/s30".
  52. ```
  53. git tag <tagname>
  54. git push origin <tag>
  55. ```
  56. 1. Developer deploys to production
  57. 1. Developer notifies product managers and testers
  58. 1. Testers verify the critical features and integrations
  59. 1. Developer who worked on JIRA issues transitions them from QA DONE to DONE and notify stakeholders
  60. 1. Product manager notify stakeholders
  61.  
  62. ## Hotfixes
  63. Hotfixes are necessary when we need to fix code in production between scheduled releases. Hotfixes are made in a hotfix branch, which work similarly to release branches.
  64.  
  65. ![x](https://wac-cdn-a.atlassian.com/dam/jcr:21cf772d-2ba5-4686-8259-fcd6fd2311df/05.svg?cdnVersion=fi)
  66.  
  67. ### Hotfix steps
  68. 1. Developer creates a hotfix branch off of master, with the branch name "hotfix/..."
  69. 1. Developer commits fix the the hotfix branch and creates pull request
  70. 1. Developer posts the pull request to the #engineering Slack channel, with a scheduled deployment time, instructions for testers, and justification for the hotfix.
  71. 1. One or more other developers review code and accept the pull request
  72. 1. Developer merges code into the develop branch
  73. 1. Testers verify the fix using the test environment and move issue from XXX to YYY
  74. 1. Developer merges pull request into master
  75. 1. Developer deploys to production
  76. 1. Developer notifies product managers and testers
  77. 1. Testers verify the critical features and integrations
  78. 1. Product manager transition JIRA issues from QA DONE to DONE and notify stakeholders
  79. 1. Pod conducts postmortem and posts to the #engineering Slack channel
  80.  
  81. ## Terms
  82. Term | Definition
  83. -----------|-----------
  84. Hotfix | unplanned change to production code that must happen before a release
  85. Release | version of code for sprint that requires regression testing and UAT (release branch)
  86. Bug | bug to be planned and fixed during an upcoming sprint
  87. Regression | bug found in a release candidate that blocks deployment
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement