From dc0b285bb402767804b6deaf40e65ec6938f2bf4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=91=A8=E9=B9=8F=E9=A3=9E=40yunify?= Date: Sat, 29 Jun 2019 13:21:21 +0800 Subject: [PATCH] refine development guide MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 周鹏飞@yunify --- docs/development-guide.md | 38 ++++++++++++++++++++++++++++++++++++-- 1 file changed, 36 insertions(+), 2 deletions(-) diff --git a/docs/development-guide.md b/docs/development-guide.md index 96e8868d0..91b01097b 100644 --- a/docs/development-guide.md +++ b/docs/development-guide.md @@ -86,7 +86,7 @@ $ git checkout -b myfeature Then edit code on the myfeature branch. -**Test and Build** +**Test and build** Currently, make rules only contain simple checks such as vet, unit test, will add e2e tests soon. @@ -96,7 +96,7 @@ Currently, make rules only contain simple checks such as vet, unit test, will ad - For MacOS, you can install KubeBuilder by following this [guide](https://book.kubebuilder.io/quick-start.html). -**Run and Test** +**Run and test** ```bash $ make all @@ -108,6 +108,21 @@ Run `make help` for additional information on these make targets. ### 5 Development in new branch +**Sync with upstream** + +After the test is completed, suggest you to keep your local in sync with upstream which can avoid conflicts. + +``` +# Rebase your the master branch of your local repo. +$ git checkout master +$ git rebase upstream/master + +# Then make your development branch in sync with master branch +git checkout new_feature +git rebase -i master +``` +**Commit local changes** + ```bash $ git add $ git commit -s -m "add your description" @@ -128,3 +143,22 @@ $ git push -f ${your_remote_name} myfeature - Check out the [pull request process](pull-request.md) for more details and advice. +## CI/CD + +KubeSphere uses [Travis CI](https://travis-ci.org/) as a CI/CD tool. + +The components of KubeSphere need to be compiled and build include following: + +`ks-apiserver, ks-controller-manager, ks-account, ks-apigateway, ks-devops` + +After your PR is merged,Travis CI will compile the entire project and build the image, and push the image `kubespheredev/[component-name]:latest` to Dockerhub (e.g. `kubespheredev/ks-apiserver:latest`) + +## Code conventions + +Please reference [Code conventions](https://github.com/kubernetes/community/blob/master/contributors/guide/coding-conventions.md) and follow with the rules. + +**Note:** + +> - All new packages and most new significant functionality must come with unit tests +> - Comment your code in English, see [Go's commenting conventions +](http://blog.golang.org/godoc-documenting-go-code) \ No newline at end of file