Skip to content

Commit 89ed27c

Browse files
schneemsjoshwlewis
andauthored
Update README and documentation (#263)
* Update README and documentation * Add missing reference link * Apply contributing review feedback * Move reference link to the proper file * Update README.md wording --------- Co-authored-by: Josh W Lewis <josh.lewis@salesforce.com>
1 parent fb755c0 commit 89ed27c

File tree

4 files changed

+271
-215
lines changed

4 files changed

+271
-215
lines changed

CONTRIBUTING.md

+126
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
1+
# Contributing Guide for Heroku Cloud Native Buildpacks
2+
3+
This page lists the operational governance model of this project, as well as the recommendations and requirements for how to best contribute to Heroku Cloud Native Buildpacks. We strive to obey these as best as possible. As always, thanks for contributing.
4+
5+
## Governance Model: Salesforce Sponsored
6+
7+
The intent and goal of open sourcing this project is to increase the contributor and user base. However, only Salesforce employees will be given `admin` rights and will be the final arbitrars of what contributions are accepted or not.
8+
9+
## Getting started
10+
11+
Please feel free to join the [Heroku Cloud Native Buildpacks discussions][discussions]. You may also wish to take a look at [Heroku's product roadmap][roadmap] to see where are headed.
12+
13+
## Ideas and Feedback
14+
15+
The `heroku/ruby` buildpack is user centered software focused on application developers. To improve the application developer experience, we need to get real world feedback. We are interested in failure stories "what could be better," success stories "what went well," and your experiences in general.
16+
17+
Please use [Heroku Cloud Native Buildpacks discussions][discussions] to provide feedback, request enhancements, or discuss ideas.
18+
19+
## Issues, Feature Requests, and Bug Reports
20+
21+
Issues should be for bugs in buildpack behavior, and not for general "my application has a problem" support. You can share your experiences building with the heroku/ruby CNB on our [discussions][discussions]. If you're unsure about whether or not to file an issue, please review the [application contract](docs/application_contract.md).
22+
23+
Issues, feature requests, and bug reports are tracked via [GitHub issues on this repository][issues]. If you find an issue and/or bug, please search the issues, and if it isn't already tracked, create a new issue. Please describe the expected behavior, actual behavior, and why the two did not align. If possible, include an [example application that reproduces the problem](https://www.codetriage.com/example_app).
24+
25+
## Fixes, Improvements, and Patches
26+
27+
Fixes, improvements, and patches all happen via [GitHub Pull Requests on this repository][pulls]. If you'd like to improve the tests, you want to make the documentation clearer, you have an alternative implementation of something that may have advantages over the way its currently done, or you have any other change, we would be happy to hear about it. For trivial changes, send a pull request. For non-trivial changes, consider [opening an issue](#issues-feature-requests-and-bug-reports) to discuss it first instead.
28+
29+
## Development
30+
31+
### Dependencies
32+
33+
This buildpack relies on [heroku/libcnb.rs][libcnb] to compile buildpacks. All [libcnb.rs dependencies][libcnb-deps] will need to be setup prior to building or testing this buildpack.
34+
35+
1. Install [rust by following instructions on their site][install-rust]
36+
1. Follow the setup instructions on [heroku/libcnb][libcnb-deps]
37+
38+
### Building the buildpack locally
39+
40+
1. Run `cargo check` to download dependencies and ensure there are no compilation issues.
41+
1. Build the buildpack:
42+
43+
```
44+
cargo libcnb package
45+
```
46+
47+
### Generate an application image
48+
49+
Once you have have built the buildpack you can use `pack build` to generate an application image.
50+
51+
```
52+
pack build sample-app \
53+
--buildpack packaged/x86_64-unknown-linux-musl/debug/heroku_ruby \
54+
--path buildpacks/ruby/tests/fixtures/default_ruby
55+
```
56+
57+
This will create an image named `sample-app` based off of the fixture at `buildpacks/ruby/tests/fixtures/default_ruby`.
58+
59+
The deployed buildpack ships with a builder that tells the `pack` CLI what other builpacks it needs. In development you must specify them via the `--buildpack` flag before this buildpack. For example to build an app that needs nodejs can run like this:
60+
61+
```
62+
pack build sample-app \
63+
--buildpack heroku/nodejs-engine \
64+
--buildpack heroku/procfile \
65+
--buildpack packaged/x86_64-unknown-linux-musl/debug/heroku_ruby \
66+
--path <path/to/application>
67+
```
68+
69+
List of buildpacks this buildpack depends on:
70+
71+
```
72+
--buildpack heroku/nodejs-engine
73+
--buildpack heroku/nodejs-yarn
74+
--buildpack heroku/jvm
75+
```
76+
77+
### Run an application image
78+
79+
Once an image is built you can run and inspect it. Here are some example commands.
80+
81+
- Interactive execution
82+
83+
```
84+
docker run -it --rm my-image-name bash
85+
```
86+
87+
- Run a command and exit
88+
89+
```
90+
docker run -it --rm my-image 'which bundle'
91+
```
92+
93+
- Boot the default webserver
94+
95+
```
96+
docker run -it --rm --env PORT=9292 -p 9292:9292 my-image
97+
```
98+
99+
- Inspect the image:
100+
101+
```
102+
pack inspect my-image
103+
```
104+
105+
### Testing
106+
107+
- `cargo test` performs Rust unit tests.
108+
- `cargo test -- --ignored` performs all integration tests.
109+
110+
See the [CI configuration](.github/workflows/ci.yml) for detailed lint and test commands.
111+
112+
## Code of Conduct
113+
114+
Please follow our [Code of Conduct](CODE_OF_CONDUCT.md).
115+
116+
## License
117+
118+
By contributing your code, you agree to license your contribution under the terms of our project [LICENSE](LICENSE) and to sign the [Salesforce CLA](https://cla.salesforce.com/sign-cla).
119+
120+
[discussions]: https://github.com/heroku/buildpacks/discussions
121+
[install-rust]: https://www.rust-lang.org/tools/install
122+
[issues]: https://github.com/heroku/buildpacks-ruby/issues
123+
[libcnb]: https://github.com/heroku/libcnb.rs
124+
[libcnb-deps]: https://github.com/heroku/libcnb.rs#development-environment-setup
125+
[pulls]: https://github.com/heroku/buildpacks-ruby/pulls
126+
[roadmap]: https://github.com/heroku/roadmap

0 commit comments

Comments
 (0)