You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+13-13Lines changed: 13 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,7 @@ Contributors are encouraged to collaborate using the following resources in addi
14
14
* Chat with us on the CNCF Slack ([get an invitation here][cncf-slack] )
15
15
*[#harbor][users-slack] for end-user discussions
16
16
*[#harbor-dev][dev-slack] for development of Harbor
17
-
* Want long-form communication instead of Slack? We have two distributions lists:
17
+
* Want long-form communication instead of Slack? We have two distribution lists:
18
18
*[harbor-users][users-dl] for end-user discussions
19
19
*[harbor-dev][dev-dl] for development of Harbor
20
20
@@ -49,7 +49,7 @@ To build the project, please refer the [build](https://goharbor.io/docs/edge/bui
49
49
50
50
### Repository Structure
51
51
52
-
Here is the basic structure of the harbor code base. Some key folders / files are commented for your references.
52
+
Here is the basic structure of the Harbor code base. Some key folders / files are commented for your reference.
53
53
```
54
54
.
55
55
...
@@ -175,7 +175,7 @@ Ensure your GOPATH and PATH have been configured in accordance with the Go envir
175
175
176
176
#### Web
177
177
178
-
Harbor web UI is built based on [Clarity](https://vmware.github.io/clarity/) and [Angular](https://angular.io/) web framework. To setup web UI development environment, please make sure the [npm](https://www.npmjs.com/get-npm) tool is installed first.
178
+
Harbor web UI is built based on [Clarity](https://vmware.github.io/clarity/) and [Angular](https://angular.io/) web framework. To setup a web UI development environment, please make sure that the [npm](https://www.npmjs.com/get-npm) tool is installed first.
@@ -205,7 +205,7 @@ PR are always welcome, even if they only contain small fixes like typos or a few
205
205
206
206
Please submit a PR broken down into small changes bit by bit. A PR consisting of a lot of features and code changes may be hard to review. It is recommended to submit PRs in an incremental fashion.
207
207
208
-
Note: If you split your pull request to small changes, please make sure any of the changes goes to `main` will not break anything. Otherwise, it can not be merged until this feature complete.
208
+
Note: If you split your pull request to small changes, please make sure any of the changes goes to `main` will not break anything. Otherwise, it can not be merged until this feature completed.
209
209
210
210
### Fork and clone
211
211
@@ -279,7 +279,7 @@ To build the code, please refer to [build](https://goharbor.io/docs/edge/build-c
279
279
280
280
**Note**: from v2.0, Harbor uses [go-swagger](https://github.com/go-swagger/go-swagger) to generate API server from Swagger 2.0 (aka [OpenAPI 2.0](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md)). To add or change the APIs, first update the `api/v2.0/swagger.yaml` file, then run `make gen_apis` to generate the API server, finally, implement or update the API handlers in `src/server/v2.0/handler` package.
281
281
282
-
As now Harbor uses `controller/manager/dao` programming model, we suggest to use[testify mock](https://github.com/stretchr/testify/blob/master/mock/doc.go) to test `controller` and `manager`. Harbor integrates [mockery](https://github.com/vektra/mockery) to generate mocks for golang interfaces using the testify mock package. To generate mocks for the interface, first add mock config in the `src/.mockery.yaml`, then run `make gen_mocks` to generate mocks.
282
+
As Harbor now uses `controller/manager/dao` programming model, we suggest using[testify mock](https://github.com/stretchr/testify/blob/master/mock/doc.go) to test `controller` and `manager`. Harbor integrates [mockery](https://github.com/vektra/mockery) to generate mocks for golang interfaces using the testify mock package. To generate mocks for the interface, first add mock config in the `src/.mockery.yaml`, then run `make gen_mocks` to generate mocks.
Once your pull request has been opened, harbor will run two CI pipelines against it.
321
+
Once your pull request has been opened, Harbor will run two CI pipelines against it.
322
322
1. In the travis CI, your source code will be checked via `golint`, `go vet` and `go race` that makes sure the code is readable, safe and correct. Also, all of unit tests will be triggered via `go test` against the pull request. What you need to pay attention to is the travis result and the coverage report.
323
323
* If any failure in travis, you need to figure out whether it is introduced by your commits.
324
-
* If the coverage dramatic decline, you need to commit unit test to coverage your code.
325
-
2. In the drone CI, the E2E test will be triggered against the pull request. Also, the source code will be checked via `gosec`, and the result is stored in google storage for later analysis. The pipeline is about to build and install harbor from source code, then to run four very basic E2E tests to validate the basic functionalities of harbor, like:
326
-
* Registry Basic Verification, to validate the image can be pulled and pushed successful.
327
-
* Trivy Basic Verification, to validate the image can be scanned successful.
328
-
* Notary Basic Verification, to validate the image can be signed successful.
329
-
* Ldap Basic Verification, to validate harbor can work in LDAP environment.
324
+
* If the coverage dramatically declines, then you need to commit a unit test to cover your code.
325
+
2. In the drone CI, the E2E test will be triggered against the pull request. Also, the source code will be checked via `gosec`, and the result is stored in google storage for later analysis. The pipeline is about to build and install harbor from source code, then to run four very basic E2E tests to validate the basic functionalities of Harbor, like:
326
+
* Registry Basic Verification, to validate that the image can be pulled and pushed successfully.
327
+
* Trivy Basic Verification, to validate that the image can be scanned successfully.
328
+
* Notary Basic Verification, to validate that the image can be signed successfully.
329
+
* Ldap Basic Verification, to validate that Harbor can work in LDAP environment.
330
330
331
331
### Push and Create PR
332
332
When ready for review, push your branch to your fork repository on `github.com`:
@@ -345,7 +345,7 @@ Commit changes made in response to review comments to the same branch on your fo
345
345
346
346
It is a great way to contribute to Harbor by reporting an issue. Well-written and complete bug reports are always welcome! Please open an issue on GitHub and follow the template to fill in required information.
347
347
348
-
Before opening any issue, please look up the existing [issues](https://github.com/goharbor/harbor/issues) to avoid submitting a duplication.
348
+
Before opening any issue, please look up the existing [issues](https://github.com/goharbor/harbor/issues) to avoid submitting a duplicate.
349
349
If you find a match, you can "subscribe" to it to get notified on updates. If you have additional helpful information about the issue, please leave a comment.
0 commit comments