# 搜索 **Repository Path**: tommyqjr/search_project ## Basic Information - **Project Name**: 搜索 - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-11-03 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # wan.xunlei.com > 迅雷游戏官网 ## 开发流程 每次开发新需求前,需要检出一个新分支,规则为: ``` [user-name]/feature|hotfix/[branch-name] ``` ### 本地开发 ```bash # install dependencies $ yarn install # serve with hot reload at localhost:3000 # 服务启动后,可以使用whistle配置规则:https://wan.xunlei.com http://127.0.0.1:3000 # 这样本地就可以直接访问https://wan.xunlei.com开发 $ yarn dev ``` ### 提测 开发完成提测时,Git-CI会自动在`10.10.32.59`上启动一个服务,每个服务通过不同的端口号区分,端口号在`CI`的`Pipelines`中的对应分支最新一个任务页输出。 测试时使用如下`Whistle`规则: ``` https://wan.xunlei.com http://10.10.32.59:port ``` ### 预发布环境 当测试完毕后,需要将分支合并到`develop`分支,合并步骤如下: ```shell # 将当前分支检出到一个新的本地分支 git checkout -b rebase # 先获取最近一个父节点 commit-id git merge-base develop [current-branch] # 将分支所有修改重置 git reset --soft commit-id # 提交所有修改,描述清楚本次的修改和需求 git add . && git commit # 进行变基 git rebase develop # 切换到develop合并代码 git merge rebase && git branch -d develop ``` 将新提交点推送到远端,`CI`会打包镜像,打包好后去到[测试环境K8S](https://dev.tdc.xunlei.cn/)发布服务。同时需要手动在`CI`中,部署静态文件到`CDN`。 然后配置host: ``` wan.xunlei.com 172.30.30.134 ``` ### 上线 预发布通过后,将代码合并到`master`,打上`Tag`,`CI`会进行打包,打包完成后,上线服务时分为两步: 1. 在`CI`中手动触发`JOB`将静态文件部署到正式环境`CDN`; 2. 然后去[正式环境K8S](https://tdc.xunlei.cn)上线服务。 这两部顺序不能乱。