-
Notifications
You must be signed in to change notification settings - Fork 1.8k
*: add CONTRIBUTING.MD #197
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
fanminshi
merged 1 commit into
operator-framework:master
from
fanminshi:add_contribution_guide
Apr 26, 2018
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
# How to contribute | ||
|
||
Operator SDK is Apache 2.0 licensed and accepts contributions via GitHub pull requests. This document outlines some of the conventions on commit message formatting, contact points for developers, and other resources to help get contributions into operator-sdk. | ||
|
||
# Email and Chat | ||
|
||
- Email: [operator-framework][operator_framework] | ||
|
||
## Getting started | ||
|
||
- Fork the repository on GitHub | ||
- See the [developer guide](./doc/dev/developer_guide.md) for build instructions | ||
|
||
## Reporting bugs and creating issues | ||
|
||
Reporting bugs is one of the best ways to contribute. However, a good bug report has some very specific qualities, so please read over our short document on [reporting bugs](./doc/dev/reporting_bugs.md) before submitting a bug report. This document might contain links to known issues, another good reason to take a look there before reporting a bug. | ||
|
||
## Contribution flow | ||
|
||
This is a rough outline of what a contributor's workflow looks like: | ||
|
||
- Create a topic branch from where to base the contribution. This is usually master. | ||
- Make commits of logical units. | ||
- Make sure commit messages are in the proper format (see below). | ||
- Push changes in a topic branch to a personal fork of the repository. | ||
- Submit a pull request to coreos/operator-sdk. | ||
- The PR must receive a LGTM from two maintainers found in the MAINTAINERS file. | ||
|
||
Thanks for contributing! | ||
|
||
### Code style | ||
|
||
The coding style suggested by the Golang community is used in operator-sdk. See the [style doc](https://github.com/golang/go/wiki/CodeReviewComments) for details. | ||
|
||
Please follow this style to make operator-sdk easy to review, maintain and develop. | ||
|
||
### Format of the commit message | ||
|
||
We follow a rough convention for commit messages that is designed to answer two | ||
questions: what changed and why. The subject line should feature the what and | ||
the body of the commit should describe the why. | ||
|
||
``` | ||
scripts: add the test-cluster command | ||
|
||
this uses tmux to setup a test cluster that can easily be killed and started for debugging. | ||
|
||
Fixes #38 | ||
``` | ||
|
||
The format can be described more formally as follows: | ||
|
||
``` | ||
<subsystem>: <what changed> | ||
<BLANK LINE> | ||
<why this change was made> | ||
<BLANK LINE> | ||
<footer> | ||
``` | ||
|
||
The first line is the subject and should be no longer than 70 characters, the second line is always blank, and other lines should be wrapped at 80 characters. This allows the message to be easier to read on GitHub as well as in various git tools. | ||
|
||
|
||
[operator_framework]: https://groups.google.com/forum/#!forum/operator-framework |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# Developer guide | ||
|
||
This document explains how to setup your dev environment. | ||
|
||
## Download Operator SDK | ||
|
||
Go to https://github.com/coreos/operator-sdk and follow the [fork guide][fork_guide] to fork, clone, and setup the local operator-sdk repository. | ||
|
||
## Vendor dependencies | ||
|
||
We use [dep](https://github.com/golang/dep) to manage dependencies. | ||
Run the following in the project root directory to update the vendored dependencies: | ||
|
||
```sh | ||
$ cd $GOPATH/src/github.com/coreos/operator-sdk | ||
$ dep ensure | ||
``` | ||
|
||
## Build the Operator SDK CLI | ||
|
||
Requirement: | ||
- Go 1.9+ | ||
|
||
Build the Operator SDK CLI `operator-sdk` binary: | ||
|
||
```sh | ||
# TODO: replace this with the ./build script. | ||
$ go install github.com/coreos/operator-sdk/commands/operator-sdk | ||
``` | ||
|
||
## Testing | ||
|
||
Run unit tests: | ||
|
||
```sh | ||
TODO: use ./test script | ||
``` | ||
|
||
[fork_guide]:https://help.github.com/articles/fork-a-repo/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Reporting bugs | ||
|
||
If any part of the operator-sdk project has bugs or documentation mistakes, please let us know by [opening an issue][operator-sdk-issue]. We treat bugs and mistakes very seriously and believe no issue is too small. Before creating a bug report, please check that an issue reporting the same problem does not already exist. | ||
|
||
To make the bug report accurate and easy to understand, please try to create bug reports that are: | ||
|
||
- Specific. Include as much details as possible: which version, what environment, what configuration, etc. | ||
|
||
- Reproducible. Include the steps to reproduce the problem. We understand some issues might be hard to reproduce, please includes the steps that might lead to the problem. | ||
|
||
- Isolated. Please try to isolate and reproduce the bug with minimum dependencies. It would significantly slow down the speed to fix a bug if too many dependencies are involved in a bug report. Debugging external systems that rely on operator-sdk is out of scope, but we are happy to provide guidance in the right direction or help with using operator-sdk itself. | ||
|
||
- Unique. Do not duplicate existing bug report. | ||
|
||
- Scoped. One bug per report. Do not follow up with another bug inside one report. | ||
|
||
It may be worthwhile to read [Elika Etemad’s article on filing good bug reports][filing-good-bugs] before creating a bug report. | ||
|
||
We might ask for further information to locate a bug. A duplicated bug report will be closed. | ||
|
||
[operator-sdk-issue]: https://github.com/coreos/operator-sdk/issues/new | ||
[filing-good-bugs]: http://fantasai.inkedblade.net/style/talks/filing-good-bugs/ |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't have a separate developer guide yet. But we already have the build instructions on the README/user-guide. We'll have to make do with that until we write more developer docs.
So rephrase it to:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry just saw the developer guide down below :)