Release
Purpose
Release is a pakaged build by delivery team. This bundle many features reflected from customer requirement. This Release Package will be deployed to the customer site.
Relationship

Principles of version name
Principles: Follow SemVer
Khai báo
- Khai báo trong module Magestore_Deli được implement vào trong bộ sản phẩm trước khi triển khai cho khách hàng, version khởi tạo là 1.0.0.
Princples Format
<MAJOR>.<MINOR>.<PATCH>
- Trong đó:
<MAJOR>
là số Phase customize.<MINOR>
là số lần cập nhật tính năng.<PATCH>
là số lần cập nhật bản vá lỗi.
Quy tắc tăng số
- Mỗi lần release cập nhật vá lỗi số
<PATCH>
tăng lên 1 đơn vị.- Mỗi lần release cập nhật tính năng (có thể lẫn cả vá lỗi), số
<MINOR>
tăng lên 1 đơn vị.- Mỗi lần release cập nhật tính năng theo phase customize, số
<MAJOR>
tăng lên 1 đơn vị.- Khi tăng số
<MINOR>
số<PATCH>
reset về 0- Khi tăng số
<MAJOR>
số<MINOR>
và<PATCH>
reset về 0
Examples
- Version hiện tại là 1.0.0 nếu release chỉ bao gồm fixbug thì phiên bản tiếp theo là 1.0.1
- Version hiện tại là 1.0.1 nếu release chỉ bao gồm tính năng (user story) thì phiên bản tiếp theo là 1.1.0
- Version hiện tại là 1.1.0 nếu release bao gồm cả tính năng (user story) và fix bug thì phiên bản tiếp theo là 1.2.0
- Version hiện tại là 1.2.0 nếu release có bao gồm tính năng của phase sau thì version tiếp theo là 2.0.0
Release package file structure
Type
- Compressed package: Currently supported
*.tar.gz
compress file extension.
Filename
-
Format:
<project_path>-delivery-<tag_name>.tar.gz
<project_path>
: path of project. Example: project has url "https://gitlab.com/noodle_team/gamelife.it",<project_path>
here is "gamelife.it"<tag_name>
: release tag of project, start with "v" character. Example: v1.0.0, v1.2.3
Package file's content
Title | Description | Is Required? | Purpose |
---|---|---|---|
app/code/Magestore | All files and directories under app/code/Magestore modules | Yes | Make sure all files deliver to customer alike all files we managing on our VCS |
pub | Some line, version of POS still store images in pub directory, release package have to have that folder to prevent missing image when deploy onto customer site | Yes (if exist) | Contains images use for some modules like: Webpos, Rewardpoints |
var/.magestore_delivery/release-<tag_name>.manifest Note: <tag_name> is release tag name |
Store hashed content of all files in release package use sha1 algorithm |
Yes | - To save the state of all file content that we deliver to customer - To verify the file on customer site still in original content after a while usage (before we fixbug or deploy newer version). |
var/.magestore_delivery/release-<tag_name>.manifest.sha1 Note: <tag_name> is release tag name |
Store hashed content of file:var/.magestore_delivery/release-<tag_name>.manifest use sha1 algorithm |
Yes | Quickly check the release manifest modified or not. |
Activity
Internal Acceptance
Prerequisite
- All the issue cards has correct labels
- All the issue cards need to release have to located in "State: Delivery Ready" column
- All the code related issue card need to release have to merged into develop branch
- All the team members join the Internal Acceptance
- Prepare environment (as same UAT site as posible - the site that we negotiate with customer when project start).
- Presenter comes to each issue anh plays follow the scenario described.
- Update issue label
- Not qualified
- Comment the reason not qualified
- Move issue back to the column "State: Pending"
- Notify to developer in charge with issue.
- Qualified
- Do not thing with issue.
- Not qualified
Decide to do the release
Prerequisite
- All the issues need to release already done with Internal Acceptance
-
Summary the result of all issues need to release
-
Make decision
If any issue with label "Type: Bug" or "Type: User story" does not meet its requirement or have to move back to previous state, that means the upcomming release is not qualified
-
Cancel (Not qualify the quality of code to deliver to the customer)
- Plan next Internal Acceptance day.
-
Release (Qualified)
-
Release use tool
-
From project page go to Repotitory > Branches. Type "release" in the search box, then press "Enter"
-
If the branch named "release" exists click "Delete" button, otherwise go to step 4.
-
Fill below information
- Create from "develop"
- Branch name "release"
-
Waiting for release job running.
Prepare release manually
Prepare release manually
Prerequisite
- Have WebHooks Setting according to this guide
- Issue Card type feature or bug need to release have to assign into the milestone of current week.
- Issue card have to have at least two labels: "Type: Bug" or "Type: User story" and "State: Delivery Ready"
-
Collect issue card need to release for project as requirement at prerequisite section above.
-
Clone project to local computer
-
Checkout branch develop
-
From the collected issue list at step 1, choose the next version release follow [Principles of Naming Version]
-
Create release branch from develop with name follow format:
release-v<release_version>
.<release_version>
is the release number you selected at step 4 -
Change release version
Edit file
Source/server/app/code/Magestore/Deli/etc/config.xml
. Change the version to release version number -
Write release note
Edit file
CHANGELOG.md
(create new if not exists). Append the list issue card collect from step 1, write as below formatv<release_version> ============ ### Magestore <pos_line> <pos_version> ### Features: 1. [#<issue_id>](<issue_url>): <issue_title> ### Bug fixed: 1. [#<issue_id>](<issue_url>): <issue_title>
<release_version>
: release version<pos_line>
: current POS line project using.<pos_version>
: current POS version project using.<issue_id>
: id of issue in project on gitlab<issue_url>
: url to view issue on gitlab<issue_title>
: issue title
-
Build code client
-
Copy
build
directory inSource/client/pos
dir topos
dir inSource/server/app/code/Magestore/Webpos/build/apps
-
Create release manifest
Create a file contains all file content is hashed in
sha1
algorithm-
Delete all files under
Source/server/var/.magestore_delivery/
-
Create release manifest file
Source/server/var/.magestore_delivery/release-v<release_version>.manifest
-
Hash all file content under
Source/server/app/code/Magestore
Use command
cd Source/server find app/code/Magestore -type f -exec sha1sum "{}" + >"var/.magestore_delivery/release-v<release_version>.manifest"
-
Hash file's content of release manifest file
sha1sum "var/.magestore_delivery/release-v<release_version>.manifest" >"var/.magestore_delivery/release-v<release_version>.manifest.sha1"
-
-
Add change files to git
git add CHANGELOG.md Source/server/app/code/Magestore/Webpos/build Source/server/app/code/Magestore/Deli Source/server/var/.magestore_delivery
-
Commit change files
git commit -m "Release v<release_version>"
-
Add release tag
git tag -a "v<release_version>" -m "v<release_version>"
-
Push commit and tag to remote
git push -u origin release-v<release_version> --tags
Release
Release manually
Prerequisite
- Have WebHooks Setting according to this guide
- Process after prepare release activity
-
Merge relase code to
master
branchgit fetch git checkout -b master # omit -b flag if you already checkout master before git pull origin master git merge --no-ff relase-v<release_version> -m "Merge branch 'release-v<release_version>' into 'master'" git push -u origin master
-
Merge release code back to
develop
branchgit fetch git checkout -b develop # omit -b flag if you already checkout develop before git pull origin develop git merge --ff-only relase-v<release_version> git push -u origin develop
-
Create release notes on gitlab
-
Move issue collected at step 1 of prepare release activity from column "State: Delivery Ready" to column "State: Delivery Done" in Group Issue Board.
-
Create delivery issue
- Create new issue on gitlab with title: "Delivery v<release_version> to customer"
- Add labels: "Type: Task", "State: To Do" to the issue
Create release package
Create from tag
Create by hand
- Checkout release tag
git checkout tags/v<release_version>
- Change to
server
dircd Source/server
- Create release package
Note: The word inside "<" and ">" is variable, change it in some specific usage.# folder named "pub" is not exists tar -cvaf <project_path>-delivery-<tag_name>.tar.gz app/code/Magestore var/.magestore_delivery # folder named "pub" is exists tar -cvaf <project_path>-delivery-<tag_name>.tar.gz app/code/Magestore pub var/.magestore_delivery
Use tool
Create from release full Source code package
Create by hand
-
Download package from release page (note: only download package with extension
.tar.gz
)Downloaded package has below format:
<project_path>-<tag_name>.tar.gz
-
Extract downloaded package
tar -xvf <project_path>-<tag_name>.tar.gz
-
Change to
server
dir in extracted packagecd <project_path>-<tag_name>/Source/server
-
Create release package
# folder named "pub" is not exists tar -cvaf <project_path>-delivery-<tag_name>.tar.gz app/code/Magestore var/.magestore_delivery # folder named "pub" is exists tar -cvaf <project_path>-delivery-<tag_name>.tar.gz app/code/Magestore pub var/.magestore_delivery
Note: The word inside "<" and ">" is variable, change it in some specific usage.
Use tool
Update issue labels after release.
Update by hand
- Go to Gitlab Group issue board
- Drag issues related to the release from column "State: Delivery Ready" then drop to column "State: Delivery Done"
Use tool
- Update soon
Create deployment issue card
Create by hand
- Go to Project detail page
- Create new issue card for Project
- Title: "Delivery <release_tag>"
- Description: Copy from release notes, then link back to project detail release page
- Labels: "State: To Do", "Type: Deploy"
- Milestone: Milestone of current week.
Use tool
- Update soon.
No Comments