Skip to content

Commit 9651769

Browse files
authored
docs: Move Contributing docs to separate file (#420)
1 parent bdd4d56 commit 9651769

File tree

2 files changed

+61
-63
lines changed

2 files changed

+61
-63
lines changed

CONTRIBUTING.md

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# Contributing
2+
3+
Contributions are welcome!
4+
5+
## Building
6+
7+
1. `git clone` this repository and `cd` into its directory
8+
2. `make build` will trigger the Golang build
9+
10+
The provided `GNUmakefile` defines additional commands generally useful during
11+
development, like for running tests, generating documentation, code formatting
12+
and linting. Taking a look at its content is recommended.
13+
14+
## Testing
15+
16+
The acceptance tests run against a disposable ArgoCD installation within a
17+
[Kind](https://github.com/kubernetes-sigs/kind) cluster. Other requirements are
18+
having a Docker daemon running and
19+
[Kustomize](https://kubectl.docs.kubernetes.io/installation/kustomize/)
20+
installed.
21+
22+
```sh
23+
make testacc_prepare_env
24+
make testacc
25+
make testacc_clean_env
26+
```
27+
28+
## Generating documentation
29+
30+
This provider uses [terraform-plugin-docs](https://github.com/hashicorp/terraform-plugin-docs/)
31+
to generate documentation and store it in the `docs/` directory.
32+
Once a release is cut, the Terraform Registry will download the documentation from `docs/`
33+
and associate it with the release version. Read more about how this works on the
34+
[official page](https://www.terraform.io/registry/providers/docs).
35+
36+
Use `make generate` to ensure the documentation is regenerated with any changes.
37+
38+
## Using a development build
39+
40+
If [running tests and acceptance tests](#testing) isn't enough, it's possible to
41+
set up a local terraform configuration to use a development builds of the
42+
provider. This can be achieved by leveraging the Terraform CLI [configuration
43+
file development
44+
overrides](https://www.terraform.io/cli/config/config-file#development-overrides-for-provider-developers).
45+
46+
First, use `make install` to place a fresh development build of the provider in
47+
your
48+
[`${GOBIN}`](https://pkg.go.dev/cmd/go#hdr-Compile_and_install_packages_and_dependencies)
49+
(defaults to `${GOPATH}/bin` or `${HOME}/go/bin` if `${GOPATH}` is not set).
50+
Repeat this every time you make changes to the provider locally.
51+
52+
Then, setup your environment following [these
53+
instructions](https://www.terraform.io/plugin/debugging#terraform-cli-development-overrides)
54+
to make your local terraform use your local build.
55+
56+
## Troubleshooting during local development
57+
58+
* **"too many open files":** Running all acceptance tests in parallel (the
59+
default) may open a lot of files and sockets, therefore ensure your local
60+
workstation [open files/sockets limits are tuned
61+
accordingly](https://k6.io/docs/misc/fine-tuning-os).

README.md

Lines changed: 0 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -74,69 +74,6 @@ in the process.
7474
* [Go](https://go.dev/doc/install) (1.19)
7575
* [GNU Make](https://www.gnu.org/software/make/)
7676
* [golangci-lint](https://golangci-lint.run/usage/install/#local-installation) (optional)
77-
78-
79-
## Contributing
80-
81-
Contributions are welcome!
82-
83-
### Building
84-
85-
1. `git clone` this repository and `cd` into its directory
86-
2. `make build` will trigger the Golang build
87-
88-
The provided `GNUmakefile` defines additional commands generally useful during
89-
development, like for running tests, generating documentation, code formatting
90-
and linting. Taking a look at it's content is recommended.
91-
92-
### Testing
93-
94-
The acceptance tests run against a disposable ArgoCD installation within a
95-
[Kind](https://github.com/kubernetes-sigs/kind) cluster. Other requirements are
96-
having a Docker daemon running and
97-
[Kustomize](https://kubectl.docs.kubernetes.io/installation/kustomize/)
98-
installed.
99-
100-
```sh
101-
make testacc_prepare_env
102-
make testacc
103-
make testacc_clean_env
104-
```
105-
106-
### Generating documentation
107-
108-
This provider uses [terraform-plugin-docs](https://github.com/hashicorp/terraform-plugin-docs/)
109-
to generate documentation and store it in the `docs/` directory.
110-
Once a release is cut, the Terraform Registry will download the documentation from `docs/`
111-
and associate it with the release version. Read more about how this works on the
112-
[official page](https://www.terraform.io/registry/providers/docs).
113-
114-
Use `make generate` to ensure the documentation is regenerated with any changes.
115-
116-
### Using a development build
117-
118-
If [running tests and acceptance tests](#testing) isn't enough, it's possible to
119-
set up a local terraform configuration to use a development builds of the
120-
provider. This can be achieved by leveraging the Terraform CLI [configuration
121-
file development
122-
overrides](https://www.terraform.io/cli/config/config-file#development-overrides-for-provider-developers).
123-
124-
First, use `make install` to place a fresh development build of the provider in
125-
your
126-
[`${GOBIN}`](https://pkg.go.dev/cmd/go#hdr-Compile_and_install_packages_and_dependencies)
127-
(defaults to `${GOPATH}/bin` or `${HOME}/go/bin` if `${GOPATH}` is not set).
128-
Repeat this every time you make changes to the provider locally.
129-
130-
Then, setup your environment following [these
131-
instructions](https://www.terraform.io/plugin/debugging#terraform-cli-development-overrides)
132-
to make your local terraform use your local build.
133-
134-
### Troubleshooting during local development
135-
136-
* **"too many open files":** Running all acceptance tests in parallel (the
137-
default) may open a lot of files and sockets, therefore ensure your local
138-
workstation [open files/sockets limits are tuned
139-
accordingly](https://k6.io/docs/misc/fine-tuning-os).
14077

14178
---
14279

0 commit comments

Comments
 (0)