-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adding DCO and updating contribution guide
Signed-off-by: Michael Hoang <[email protected]>
- Loading branch information
1 parent
3385a05
commit df1d86f
Showing
2 changed files
with
87 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,22 @@ Contributions are welcome! | |
|
||
Before contributing to this repository for the first time, please review our project's [Code of Conduct](https://github.com/devfile/api/blob/main/CODE_OF_CONDUCT.md). | ||
|
||
## Certificate of Origin | ||
|
||
By contributing to this project you agree to the Developer Certificate of | ||
Origin (DCO). This document was created by the Linux Kernel community and is a | ||
simple statement that you, as a contributor, have the legal right to make the | ||
contribution. See the [DCO](DCO) file for details. | ||
|
||
In order to show your agreement with the DCO you should include at the end of the commit message, | ||
the following line: | ||
|
||
``` | ||
Signed-off-by: First Lastname <[email protected]> | ||
``` | ||
|
||
Once you set your user.name and user.email in your git config, you can sign your commit automatically with `git commit -s`. | ||
|
||
## Getting Started | ||
|
||
### Issues | ||
|
@@ -14,6 +30,14 @@ Before contributing to this repository for the first time, please review our pro | |
|
||
- If a related issue doesn't exist, you can open a new issue using a relevant [issue form](https://github.com/devfile/api/issues/new/choose). You can tag issues with `/area registry`. | ||
|
||
## Prerequisites | ||
|
||
The following are required to build the viewer: | ||
|
||
- Node.js 15.6.1 or greater | ||
- React 17.0.08 or greater | ||
- yarn | ||
|
||
### Development | ||
|
||
#### Run the development server: | ||
|
@@ -48,20 +72,30 @@ npm run start | |
yarn start | ||
``` | ||
|
||
### Adding remote repositories | ||
#### Formatting code | ||
|
||
Notes: | ||
`yarn lint` to check if files are formatted correctly | ||
`yarn format` to run the code formatter | ||
|
||
### Adding remote repositories | ||
|
||
- For devfile hosts (environment variable or config file) specify a remote url or a local directory structure and `index.json` that follows the `devfile/api` spec. | ||
|
||
- You can have infinitely many sources as long as the name for the source repository is different. | ||
- There are two types of source types, url and local. | ||
|
||
- There are two types of source types: url and local. | ||
|
||
- url is for specifying a remote hosts. | ||
- local is for specifying a local hosts. NOTE: Local MUST have `index.json` under the root path specified, an example is below. | ||
- local is for specifying a local hosts. | ||
- _Local MUST have `index.json` under the root path specified, an example is below._ | ||
|
||
- The "alias" property is optional and can only be assigned if using the "url" property. | ||
|
||
- An alias is only recommended if the "url" property is assigned a localhost address. If no alias is specified the share button will use the "url" property. | ||
|
||
- The link for the share button will not work if "local" is specified. | ||
|
||
`/devfiles` | ||
e.g. `/devfiles` directory | ||
|
||
``` | ||
+-- devfiles | ||
|
@@ -72,7 +106,7 @@ Notes: | |
| +-- index.json | ||
``` | ||
|
||
`/**/index.json` | ||
e.g. `/**/index.json` file | ||
|
||
```json | ||
[ | ||
|
@@ -108,24 +142,23 @@ Notes: | |
] | ||
``` | ||
|
||
Configure the registry viewer through environment the variable. | ||
|
||
`DEVFILE_REGISTRY_HOSTS` | ||
Configure the registry viewer through the `DEVFILE_REGISTRY_HOSTS` environment variable: | ||
|
||
Notes about environment variable: | ||
``` | ||
DEVFILE_REGISTRY_HOSTS="example1>url>localhost:8080>https://registry.devfile.io|example2>local>/devfiles" | ||
``` | ||
|
||
- The value assigned to the environment variable must be surrounded by quotes. | ||
|
||
- Each source MUST contain a name for the source repository, a source type (url or local), and a location. | ||
|
||
- A source is split by ">". i.e. `name>type>location>alias` | ||
- Multiple sources are be split by "|". i.e. `name>type>location>alias|name>type>location` | ||
|
||
``` | ||
DEVFILE_REGISTRY_HOSTS="example1>url>localhost:8080>https://registry.devfile.io|example2>local>/devfiles" | ||
``` | ||
- Multiple sources are be split by "|". i.e. `name>type>location>alias|name>type>location` | ||
|
||
Configure the registry viewer through config file. | ||
Configure the registry viewer through config file: | ||
|
||
`/config/devfile-registry-hosts.json` | ||
e.g. `/config/devfile-registry-hosts.json` | ||
|
||
```json | ||
{ | ||
|
@@ -156,13 +189,7 @@ The environment variable `ANALYTICS_WRITE_KEY` is the Segment write key. Note: D | |
|
||
### Pull Requests | ||
|
||
All commits must be signed off with the footer: | ||
|
||
``` | ||
Signed-off-by: First Lastname <[email protected]> | ||
``` | ||
|
||
Once you set your `user.name` and `user.email` in your git config, you can sign your commit automatically with `git commit -s`. When you think the code is ready for review, create a pull request and link the issue associated with it. | ||
When you think the code is ready for review, create a pull request and link the issue associated with it. | ||
|
||
Owners of the repository will watch out for and review new PRs. | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
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. |