Skip to content

Commit

Permalink
Add DEVELOPMENT.md, relevant policies in CONTRIBUTING.md, README.md c…
Browse files Browse the repository at this point in the history
…leanup

Signed-off-by: Javier Romero <[email protected]>
  • Loading branch information
jromero committed Mar 24, 2020
1 parent 741f612 commit 6c77261
Show file tree
Hide file tree
Showing 4 changed files with 154 additions and 96 deletions.
143 changes: 59 additions & 84 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,102 +1,77 @@
We're glad you are interested in contributing to this project. We hope that this
document helps you get started.

If something is missing, incorrect, or made irrelevant please feel free to make
a PR to keep it up-to-date.
## Project Policies

## Prerequisites
This repository adhere's to the following project policies:

- [Go](https://golang.org/dl/)
- including [Git](https://git-scm.com/)
- [Docker](https://www.docker.com/)
- [Code of Conduct](https://github.com/buildpacks/.github/blob/master/CODE_OF_CONDUCT.md)
- [Security](https://github.com/buildpacks/.github/blob/master/SECURITY.md)
- [Support](https://github.com/buildpacks/.github/blob/master/SUPPORT.md)

## Development
## Pull Request Process

### Building
1. [Fork][fork] the repository.
2. Create a branch for the issue: `git checkout -b {{BRANCH_NAME}}`
3. Make any changes deemed necessary.
4. Commit your changes: `git commit -s`\
_Learn more about the [sign-off](#sign-off-process) process below._
5. Push to GitHub: `git push origin {{BRANCH_NAME}}`
6. [Create the pull request][create-pr].

To build pack:
```
make build
```

This will output the binary to the directory `out/`.

Options:

| ENV_VAR | Description | Default |
|--------------|------------------------------------------------------------------------|---------|
| GOCMD | Change the `go` executable. For example, [richgo][rgo] for testing. | go |
| PACK_BIN | Change the name or location of the binary relative to `out/`. | pack |
| PACK_VERSION | Tell `pack` what version to consider itself | `dev` |

[rgo]: https://github.com/kyoh86/richgo

_NOTE: This project uses [go modules](https://github.com/golang/go/wiki/Modules) for dependency management._

### Testing

To run unit and integration tests:

```bash
make unit
```

To run acceptance tests:
```bash
make acceptance
```

Alternately, to run all tests:
```bash
make test
```
## Sign-off Process

### Formatting
Every commit contributed to this project must be signed-off.

To format the code:
A sign-off is a single line added to your commit messages that certifies that you wrote the contributed changes.

```bash
make format
The full text of the certification from [developercertificate.org](http://developercertificate.org/) is a follows:
```

### Verification

To verify formatting and vet:
```bash
make verify
Developer Certificate of Origin
Version 1.1
Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
1 Letterman Drive
Suite D4700
San Francisco, CA, 94129
Everyone is permitted to copy and distribute verbatim copies of this
license document, but changing it is not allowed.
Developer's Certificate of Origin 1.1
By making a contribution to this project, I certify that:
(a) The contribution was created in whole or in part by me and I
have the right to submit it under the open source license
indicated in the file; or
(b) The contribution is based upon previous work that, to the best
of my knowledge, is covered under an appropriate open source
license and I have the right under that license to submit that
work with modifications, whether created in whole or in part
by me, under the same open source license (unless I am
permitted to submit under a different license), as indicated
in the file; or
(c) The contribution was provided directly to me by some other
person who certified (a), (b) or (c) and I have not modified
it.
(d) I understand and agree that this project and the contribution
are public and that a record of the contribution (including all
personal information I submit with it, including my sign-off) is
maintained indefinitely and may be redistributed consistent with
this project or the open source license(s) involved.
```

## Pull Requests

1. **[Fork]((https://help.github.com/en/articles/fork-a-repo)) the repo**
2. **Code, Test, Commit...**

_Don't forget utilize the convenient make functions above._

3. **Preparing a Branch**

We prefer to have PRs that are encompassed in a single commit. This might
require that you execute some of these commands:

If you are no up-to-date with master:
```bash
# rebase from master (applies your changes on top of master)
git pull -r origin master
```

If you made more than one commit:
```bash
# squash multiple commits, if applicable
# set the top most commit to `pick` and all subsequent to `squash`
git rebase -i origin/master
```
The signature should look as such:

Another requirement is that you sign your work. See [DCO](https://probot.github.io/apps/dco/) for more details.
```bash
git commit --amend --signoff
```
Signed-off-by: Joe Smith <[email protected]>

4. **Submit a Pull Request**
> Pro-tip: `git` can automatically add the signature by adding the `-s` flag to the commit command:\
> `git commit -s`
Submitting the pull request is done in [GitHub](https://github.com/buildpacks/pack/compare/) by selecting
your branch as the `compare` branch.
[fork]: https://help.github.com/en/github/getting-started-with-github/fork-a-repo
[create-pr]: https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request-from-a-fork
76 changes: 76 additions & 0 deletions DEVELOPMENT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# Development

## Prerequisites

* [Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git)
* [Go](https://golang.org/doc/install)
* [Docker](https://www.docker.com/)
* Make
* macOS: `xcode-select --install`
* Windows: `choco install make`

## Tasks

### Building

To build pack:
```
make build
```

This will output the binary to the directory `out/`.

Options:

| ENV_VAR | Description | Default |
|--------------|------------------------------------------------------------------------|---------|
| GOCMD | Change the `go` executable. For example, [richgo][rgo] for testing. | go |
| PACK_BIN | Change the name or location of the binary relative to `out/`. | pack |
| PACK_VERSION | Tell `pack` what version to consider itself | `dev` |

[rgo]: https://github.com/kyoh86/richgo

_NOTE: This project uses [go modules](https://github.com/golang/go/wiki/Modules) for dependency management._

### Testing

To run unit and integration tests:
```shell
make unit
```

To run acceptance tests:
```shell
make acceptance
```

Alternately, to run all tests:
```shell
make test
```

### Tidy

To format the code:
```shell
make format
```

To tidy up the codebase and dependencies:
```shell
make tidy
```

### Verification

To verify formatting and code quality:
```shell
make verify
```

### Prepare for PR

Runs various checks to ensure compliance:
```shell
make prepare-for-pr
```
31 changes: 19 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,27 +7,34 @@
[![Slack](https://slack.buildpacks.io/badge.svg)](https://slack.buildpacks.io/)

`pack` makes it easy for...
- **App Developers** to use buildpacks to convert code into runnable images.
- **Buildpack Authors** to develop and package buildpacks for distribution.
- **Operators** to package buildpacks for distribution and maintain applications.

`pack` is a CLI implementation of the [Platform Interface Specification][platform-spec] for [Cloud Native Buildpacks][buildpacks.io].
- [**App Developers**][app-dev] to use buildpacks to convert code into runnable images.
- [**Buildpack Authors**][bp-author] to develop and package buildpacks for distribution.
- [**Operators**][operator] to package buildpacks for distribution and maintain applications.

## Usage

- [Installing][install-pack]
- [Getting Started][getting-started]
<img src="resources/pack-build.gif" width="600px" />

## Getting Started

Get started by running through our tutorial: [An App’s Brief Journey from Source to Image][getting-started]

## Contributing

For information on how to contribute to this project including its development
process see [CONTRIBUTING.md](CONTRIBUTING.md).
- [CONTRIBUTING](CONTRIBUTING.md) - Information on how to contribute, including the pull request process.
- [DEVELOPMENT](DEVELOPMENT.md) - Further detail to help you during the development process.


## Specifications
`pack` is a CLI implementation of the [Platform Interface Specification][platform-spec] for [Cloud Native Buildpacks][buildpacks.io].

## Resources
- [Buildpack Specification](https://github.com/buildpacks/spec/blob/master/buildpack.md)
- [Platform Specification][platform-spec]
To learn more about the details, check out the [specs repository][specs].

[app-dev]: https://buildpacks.io/docs/app-developer-guide/
[bp-author]: https://buildpacks.io/docs/buildpack-author-guide/
[operator]: https://buildpacks.io/docs/operator-guide/
[buildpacks.io]: https://buildpacks.io/
[install-pack]: https://buildpacks.io/docs/install-pack/
[getting-started]: https://buildpacks.io/docs/app-journey
[specs]: https://github.com/buildpacks/spec/
[platform-spec]: https://github.com/buildpacks/spec/blob/master/platform.md
Binary file added resources/pack-build.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 6c77261

Please sign in to comment.