This is an automated email from the ASF dual-hosted git repository. littlecui pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/servicecomb-service-center.git
The following commit(s) were added to refs/heads/master by this push: new 5878b70 Create CONTRIBUTING.md 5878b70 is described below commit 5878b707818174ed7d73de6c4418517bd1bbd1f0 Author: little-cui <sure_0...@qq.com> AuthorDate: Thu Nov 15 22:34:39 2018 +0800 Create CONTRIBUTING.md --- CONTRIBUTING.md | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..f9cbc23 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,50 @@ +## Contribution guide for Service-Center + +Thanks everyone for contributing to [Service-Center](https://github.com/apache/servicecomb-service-center). + +This document explains the process and best practices for submitting a Pull Request to the Service-Center project. This document can be treated as a reference for all contributors and be useful to new and infrequent submitters. + +#### Cloning the repo and put it in $GOPATH + +Clone the repo in a proper GOPATH + +``` +git clone https://github.com/apache/servicecomb-service-center.git $GOPATH/src/github.com/apache/servicecomb-service-center +cd $GOPATH/src/github.com/apache/servicecomb-service-center +``` + +#### Download the Dependencies + +We use glide for dependency management, please follow the below steps for downloading all the dependencies required for building this project. + +``` +curl https://glide.sh/get | sh +glide install +``` + +#### Make your Changes + +If this is a bug or a small fix then you can directly make the changes and ensure all the steps in this documentation and raise a PR, but If it is a feature or a big design or architecture change then we recommend you to raise an issue [here](https://github.com/apache/servicecomb-service-center/issues) or discuss the same in our [mailing list](https://groups.google.com/forum/#!forum/servicecomb-developers). + +#### Compile and running Test locally. + +Once you are done with your changes then please follow the below checks to ensure the code quality before raising a PR. +``` +go fmt ./... + +go build -o service-center +``` + +Running UT in local env, this step assumes you have a docker running in your env. +``` +bash -x scripts/ut_test_in_docker.sh +``` + +Once UT has passed you can run the integration test to ensure the overall functionality is not altered. +``` +bash -x scripts/integration_test.sh +``` + +#### Pushing the Code and Raising PR + +Once you are done with compiling, UT and IT then you are good to go for raising the PR, please follow these [guidelines](https://help.github.com/articles/creating-a-pull-request/) for raising the PR.