|
| 1 | +Contributor License Agreement |
| 2 | +--------------- |
| 3 | + |
| 4 | +Follow these steps to make a contribution to any of our open source repositories: |
| 5 | + |
| 6 | +1. Ensure that you have completed our CLA Agreement for [individuals](https://www.cloudfoundry.org/wp-content/uploads/2015/07/CFF_Individual_CLA.pdf) or [corporations](https://www.cloudfoundry.org/wp-content/uploads/2015/07/CFF_Corporate_CLA.pdf). |
| 7 | + |
| 8 | +1. Set your name and email (these should match the information on your submitted CLA) |
| 9 | + ``` |
| 10 | + git config --global user.name "Firstname Lastname" |
| 11 | + git config --global user.email "[email protected]" |
| 12 | + ``` |
| 13 | + |
| 14 | +1. All contributions must be sent using GitHub pull requests as they create a nice audit trail and structured approach. |
| 15 | + |
| 16 | +The originating github user has to either have a github id on-file with the list of approved users that have signed |
| 17 | +the CLA or they can be a public "member" of a GitHub organization for a group that has signed the corporate CLA. |
| 18 | +This enables the corporations to manage their users themselves instead of having to tell us when someone joins/leaves an organization. By removing a user from an organization's GitHub account, their new contributions are no longer approved because they are no longer covered under a CLA. |
| 19 | + |
| 20 | +If a contribution is deemed to be covered by an existing CLA, then it is analyzed for engineering quality and product |
| 21 | +fit before merging it. |
| 22 | + |
| 23 | +If a contribution is not covered by the CLA, then the automated CLA system notifies the submitter politely that we |
| 24 | +cannot identify their CLA and ask them to sign either an individual or corporate CLA. This happens automatically as a |
| 25 | +comment on pull requests. |
| 26 | + |
| 27 | +When the project receives a new CLA, it is recorded in the project records, the CLA is added to the database for the |
| 28 | +automated system uses, then we manually make the Pull Request as having a CLA on-file. |
| 29 | + |
| 30 | + |
| 31 | +Initial Setup |
| 32 | +--------------- |
| 33 | +- Install docker |
| 34 | + |
| 35 | +- Add required directories |
| 36 | + |
| 37 | +```bash |
| 38 | +# create parent directory |
| 39 | +mkdir -p ~/workspace |
| 40 | +cd ~/workspace |
| 41 | + |
| 42 | +# clone ci |
| 43 | +git clone https://github.com/cloudfoundry/wg-app-platform-runtime-ci.git |
| 44 | + |
| 45 | +# clone repo |
| 46 | +git clone https://github.com/cloudfoundry/diego-release.git --recursive |
| 47 | +cd diego-release |
| 48 | +``` |
| 49 | + |
| 50 | +Running Tests |
| 51 | +--------------- |
| 52 | + |
| 53 | +> [!TIP] |
| 54 | +> Running tests for this repo requires a DB flavor. The following scripts will default to mysql DB. Set DB environment variable for alternate DBs. Valid Options: mysql-8.0(or mysql),postgres |
| 55 | +
|
| 56 | +- `./scripts/create-docker-container.bash`: This will create a docker container with appropriate mounts. This |
| 57 | +script can be used for interactive development with a long running container. |
| 58 | +- `./scripts/test-in-docker.bash`: Create docker container and run all tests and setup in a single script. |
| 59 | + - `./scripts/test-in-docker.bash <package> <sub-package>`: For running tests under a specific package and/or sub-package |
| 60 | + |
| 61 | +When inside docker container: |
| 62 | + |
| 63 | +- `/repo/scripts/docker/build-binaries.bash`: (REQUIRED) This will build required binaries for running tests. |
| 64 | +- `/repo/scripts/docker/test.bash`: This will run all tests in this repo. |
| 65 | +- `/repo/scripts/docker/test.bash <package>`: This will only run a package's tests |
| 66 | +- `/repo/scripts/docker/test.bash <package> <sub-package>`: This will only run sub-package tests for package |
| 67 | +- `/repo/scripts/docker/tests-template.bash`: This will test bosh-spec templates. |
| 68 | +- `/repo/scripts/docker/lint.bash`: This will run required linters. |
| 69 | + |
| 70 | +> [!IMPORTANT] |
| 71 | +> If you are about to submit a PR, please make sure to run `./scripts/test-in-docker.bash` for MySQL and Postgres to ensure everything is tested in clean container. If you are developing, you can create create a docker container first, then the only required script to run before testing your specific component is `build-binaries.bash`. |
0 commit comments