|
1 | 1 | --- |
2 | | -title: "Contributing" |
3 | | -linkTitle: "Contributing" |
| 2 | +title: "Contribute to PipeCD" |
| 3 | +linkTitle: "Contribute to PipeCD" |
4 | 4 | weight: 1 |
5 | 5 | description: > |
6 | 6 | This page describes how to contribute to PipeCD. |
7 | 7 | --- |
8 | 8 |
|
9 | | -PipeCD is an open source project that anyone in the community can use, improve, and enjoy. We'd love you to join us! [Contributing to PipeCD](https://github.com/pipe-cd/pipecd/tree/master/CONTRIBUTING.md) is the best place to start with. |
| 9 | +PipeCD is an open source project that anyone in the community can use, improve, and enjoy. We'd love you to join us! |
| 10 | + |
| 11 | +## Code of Conduct |
| 12 | + |
| 13 | +PipeCD follows the [CNCF Code of Conduct](https://github.com/cncf/foundation/blob/master/code-of-conduct.md). Please read it to understand which actions are acceptable and which are not. |
| 14 | + |
| 15 | +## Ways to Contribute |
| 16 | + |
| 17 | +There are many ways to contribute, and many don't involve writing code: |
| 18 | + |
| 19 | +- **Use PipeCD** — Follow the [Quickstart](/docs/quickstart/) and report issues you encounter |
| 20 | +- **Triage issues** — Browse [open issues](https://github.com/pipe-cd/pipecd/issues), provide workarounds, ask for clarification, or suggest labels |
| 21 | +- **Fix bugs** — Issues labeled [good first issue](https://github.com/pipe-cd/pipecd/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22) are great starting points |
| 22 | +- **Improve docs** — See [Contribute to PipeCD Documentation](../contributing-documentation/) |
| 23 | +- **Participate in discussions** — Share ideas in [GitHub Discussions](https://github.com/pipe-cd/pipecd/discussions) |
| 24 | + |
| 25 | +## Development Setup |
| 26 | + |
| 27 | +### Project Structure |
| 28 | + |
| 29 | +PipeCD consists of several components: |
| 30 | + |
| 31 | +| Component | Description | |
| 32 | +|-----------|-------------| |
| 33 | +| [cmd/pipecd](https://github.com/pipe-cd/pipecd/tree/master/cmd/pipecd) | Control Plane — manages deployment data and provides gRPC API | |
| 34 | +| [cmd/piped](https://github.com/pipe-cd/pipecd/tree/master/cmd/piped) | Piped agent — runs in your cluster | |
| 35 | +| [cmd/pipectl](https://github.com/pipe-cd/pipecd/tree/master/cmd/pipectl) | Command-line tool | |
| 36 | +| [cmd/launcher](https://github.com/pipe-cd/pipecd/tree/master/cmd/launcher) | Command executor for remote upgrade | |
| 37 | +| [web](https://github.com/pipe-cd/pipecd/tree/master/web) | Web UI | |
| 38 | +| [docs](https://github.com/pipe-cd/pipecd/tree/master/docs) | Documentation | |
| 39 | + |
| 40 | +### Prerequisites |
| 41 | + |
| 42 | +- Go (check `go.mod` for version) |
| 43 | +- Node.js and Yarn (for web development) |
| 44 | +- Docker |
| 45 | +- kubectl |
| 46 | +- kind (Kubernetes in Docker) |
| 47 | + |
| 48 | +### Starting a Local Environment |
| 49 | + |
| 50 | +#### 1. Update Dependencies |
| 51 | + |
| 52 | +```bash |
| 53 | +make update/go-deps |
| 54 | +make update/web-deps |
| 55 | +``` |
| 56 | + |
| 57 | +> Starting a local environment may fail if dependencies are not up to date. |
| 58 | +
|
| 59 | +#### 2. Start Local Cluster and Registry |
| 60 | + |
| 61 | +```bash |
| 62 | +make up/local-cluster |
| 63 | +``` |
| 64 | + |
| 65 | +This creates the `pipecd` Kubernetes namespace and starts a local registry. |
| 66 | + |
| 67 | +To clean up later: |
| 68 | + |
| 69 | +```bash |
| 70 | +make down/local-cluster |
| 71 | +``` |
| 72 | + |
| 73 | +#### 3. Run Control Plane |
| 74 | + |
| 75 | +```bash |
| 76 | +make run/pipecd |
| 77 | +``` |
| 78 | + |
| 79 | +To stop: |
| 80 | + |
| 81 | +```bash |
| 82 | +make stop/pipecd |
| 83 | +``` |
| 84 | + |
| 85 | +#### 4. Port Forward |
| 86 | + |
| 87 | +In a separate terminal: |
| 88 | + |
| 89 | +```bash |
| 90 | +kubectl port-forward -n pipecd svc/pipecd 8080 |
| 91 | +``` |
| 92 | + |
| 93 | +#### 5. Access the UI |
| 94 | + |
| 95 | +Open [http://localhost:8080?project=quickstart](http://localhost:8080?project=quickstart) |
| 96 | + |
| 97 | +Login credentials: |
| 98 | +- **Username:** `hello-pipecd` |
| 99 | +- **Password:** `hello-pipecd` |
| 100 | + |
| 101 | +### Running Piped Agent |
| 102 | + |
| 103 | +1. Ensure Control Plane is running and accessible. |
| 104 | + |
| 105 | +2. Register a new Piped: |
| 106 | + - Go to Settings → Piped (or [http://localhost:8080/settings/piped?project=quickstart](http://localhost:8080/settings/piped?project=quickstart)) |
| 107 | + - Add a new piped and copy the generated Piped ID and base64 key |
| 108 | + |
| 109 | +3. Create `piped-config.yaml` in the repository root: |
| 110 | + |
| 111 | + > **Tip:** Create a `.dev` folder (gitignored) for multiple config files. |
| 112 | +
|
| 113 | + ```yaml |
| 114 | + apiVersion: pipecd.dev/v1beta1 |
| 115 | + kind: Piped |
| 116 | + spec: |
| 117 | + projectID: quickstart |
| 118 | + pipedID: <YOUR_PIPED_ID> |
| 119 | + pipedKeyData: <YOUR_PIPED_BASE64_KEY> |
| 120 | + apiAddress: localhost:8080 |
| 121 | + repositories: |
| 122 | + - repoId: example |
| 123 | + remote: git@github.com:pipe-cd/examples.git |
| 124 | + branch: master |
| 125 | + syncInterval: 1m |
| 126 | + platformProviders: |
| 127 | + - name: example-kubernetes |
| 128 | + type: KUBERNETES |
| 129 | + config: |
| 130 | + kubeConfigPath: /path/to/.kube/config |
| 131 | + ``` |
| 132 | +
|
| 133 | +4. Start the Piped agent: |
| 134 | +
|
| 135 | + ```bash |
| 136 | + make run/piped CONFIG_FILE=path/to/piped-config.yaml INSECURE=true |
| 137 | + ``` |
| 138 | + |
| 139 | +### Useful Commands |
| 140 | + |
| 141 | +Check the [Makefile](https://github.com/pipe-cd/pipecd/blob/master/Makefile) for available commands. Common ones: |
| 142 | + |
| 143 | +```bash |
| 144 | +make check # Run all checks (lint, test, etc.) |
| 145 | +make test/go # Run Go tests |
| 146 | +make test/web # Run web tests |
| 147 | +make build/go # Build Go binaries |
| 148 | +``` |
| 149 | + |
| 150 | +## Pull Request Process |
| 151 | + |
| 152 | +### Before You Start |
| 153 | + |
| 154 | +1. **Find or create an issue** — Check if an issue exists, or open one for new features/bugs |
| 155 | +2. **Claim the issue** — Comment "I'd like to work on this" to get assigned (expected to submit PR within 7 days) |
| 156 | +3. **Investigate first** — Discuss your approach in the issue before coding to reduce back-and-forth on the PR |
| 157 | +4. **Focus on one issue** — Especially for newcomers, work on one issue at a time |
| 158 | + |
| 159 | +### Submitting a Pull Request |
| 160 | + |
| 161 | +1. **Keep PRs small** — Aim for ~300 lines of diff. Split larger changes into multiple PRs. |
| 162 | + |
| 163 | +2. **Use descriptive titles** — Follow commit message style: present tense, capitalize first letter |
| 164 | + |
| 165 | + ``` |
| 166 | + Add imports to Terraform plan result |
| 167 | + ``` |
| 168 | + |
| 169 | +3. **Sign off commits** — Required for DCO compliance: |
| 170 | + |
| 171 | + ```bash |
| 172 | + git commit -s -m "Your commit message" |
| 173 | + ``` |
| 174 | + |
| 175 | +4. **Run checks before submitting:** |
| 176 | + |
| 177 | + ```bash |
| 178 | + make check |
| 179 | + ``` |
| 180 | + |
| 181 | +5. **Target the `master` branch** — All PRs should be opened against `master` |
| 182 | + |
| 183 | +### User-Facing Changes |
| 184 | + |
| 185 | +If your change affects users, update the PR description: |
| 186 | + |
| 187 | +```md |
| 188 | +**Does this PR introduce a user-facing change?**: |
| 189 | +- **How are users affected by this change**: |
| 190 | +- **Is this breaking change**: |
| 191 | +- **How to migrate (if breaking change)**: |
| 192 | +``` |
| 193 | + |
| 194 | +### Licensing |
| 195 | + |
| 196 | +By contributing, you agree to license your contributions under the Apache License Version 2.0. Add this header to new files: |
| 197 | + |
| 198 | +```go |
| 199 | +// Copyright 2025 The PipeCD Authors. |
| 200 | +// |
| 201 | +// Licensed under the Apache License, Version 2.0 (the "License"); |
| 202 | +// you may not use this file except in compliance with the License. |
| 203 | +// You may obtain a copy of the License at |
| 204 | +// |
| 205 | +// http://www.apache.org/licenses/LICENSE-2.0 |
| 206 | +// |
| 207 | +// Unless required by applicable law or agreed to in writing, software |
| 208 | +// distributed under the License is distributed on an "AS IS" BASIS, |
| 209 | +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 210 | +// See the License for the specific language governing permissions and |
| 211 | +// limitations under the License. |
| 212 | +``` |
| 213 | + |
| 214 | +## Reporting Issues |
| 215 | + |
| 216 | +### Bugs |
| 217 | + |
| 218 | +File bugs at [GitHub Issues](https://github.com/pipe-cd/pipecd/issues/new?assignees=&labels=kind%2Fbug&projects=&template=bug-report.md): |
| 219 | + |
| 220 | +- **One issue, one bug** |
| 221 | +- **Provide reproduction steps** — List all steps to reproduce the issue |
| 222 | + |
| 223 | +### Security Issues |
| 224 | + |
| 225 | +Report security vulnerabilities privately via Slack or Twitter DM to maintainers listed in [MAINTAINERS.md](https://github.com/pipe-cd/pipecd/blob/master/MAINTAINERS.md). |
| 226 | + |
| 227 | +### Feature Requests |
| 228 | + |
| 229 | +- [Enhancement request](https://github.com/pipe-cd/pipecd/issues/new?assignees=&labels=kind%2Fenhancement&projects=&template=enhancement.md) — Improvements to existing features |
| 230 | +- [Feature request](https://github.com/pipe-cd/pipecd/issues/new?assignees=&labels=kind%2Ffeature&projects=&template=new-feature.md) — Entirely new features |
| 231 | + |
| 232 | +## Join the Community |
| 233 | + |
| 234 | +### Slack |
| 235 | + |
| 236 | +We have a `#pipecd` channel on [CNCF Slack](https://cloud-native.slack.com/) for discussions and help. You can also assist other users in the channel. |
| 237 | + |
| 238 | +### Community Meetings |
| 239 | + |
| 240 | +We host [PipeCD Development and Community Meetings](https://zoom-lfx.platform.linuxfoundation.org/meeting/96831504919?password=2f60b8ec-5896-40c8-aa1d-d551ab339d00) every 2 weeks where we share project news, demos, answer questions, and triage issues. View the [Meeting Notes and Agenda](https://bit.ly/pipecd-mtg-notes). |
| 241 | + |
| 242 | +### Become a Member |
| 243 | + |
| 244 | +If you'd like to join the pipe-cd GitHub organization: |
| 245 | + |
| 246 | +- Have at least 5 PRs merged to repositories in the pipe-cd organization |
| 247 | +- Attend a PipeCD public community meeting |
| 248 | + |
| 249 | +Membership isn't required to contribute—it's for those who want to contribute long-term or take ownership of features. |
| 250 | + |
| 251 | +## What Happens Next? |
| 252 | + |
| 253 | +The maintainers will review your PR. We'll help with obvious issues and work with you to get it merged. Thank you for contributing! |
0 commit comments