Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 64 additions & 0 deletions CONTRIBUTING.MD
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
Copy link
Contributor

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:

See the user-guide for build instructions.

Copy link
Contributor

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 :)


## 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
39 changes: 39 additions & 0 deletions doc/dev/developer_guide.md
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/
22 changes: 22 additions & 0 deletions doc/dev/reporting_bugs.md
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/