As a potential contributor, your changes and ideas are always welcome. Please do not hesitate to ask a question using GitHub issues or send a pull request to contribute changes.
If you have not previously done so, please fill out and submit an Individual Contributor License Agreement or a Corporate Contributor License Agreement.
We encourage contributors to have discussion around design and implmentation with team members before making significant changes to the project through GitHub Issues. The product manager will prioritize where the feature will fit into the project's road map.
- Fork the project on GitHub
- Make your feature addition or bug fix. Please make sure there is appropriate test coverage.
- Run tests.
- Make sure your fork is up to date with
develop
. - Send a pull request for the
develop
branch. - The team will triage the pull request and prioritise it in the team's backlog of ongoing work.
- A team member will approve the pull request or make suggestions for changes.
Unit tests code are collocated in the same package with source code.
If the changes are for BOSH templating logic then please consider adding unit tests to BOSH templating tests.
Execute command ./scripts/run_tests
to run unit tests for kubo-release. These includes tests for the BOSH templating tests. Please run these tests before submitting a pull request.
Integration tests are located in kubo-ci.
- Install Go
- Install Ginkgo
- Have a kubeconfig to your running CFCR cluster saved at
~/.kube/config
, or setexport KUBECONFIG=/path/to/your/kubeconfig
- Clone the kubo-ci repository
- Run
GOPATH="./kubo-ci" ginkgo -keepGoing -r -progress -flakeAttempts=2 -skipPackage "${skipped_packages}" "./kubo-ci/src/tests/integration-tests/"
Where ${skipped_packages}
is a comma-delimited string of zero, one or more of:
multiaz
persistent_volume
k8s_lbs
cidrs
addons
Some tests will require additional ops-files to be applied when deploying your cluster. We’d recommend reading the Continuous Integration configuration files and the integration test source code.
KDRATs (kubo-disaster-recovery-acceptance-tests) test disaster recovery of CFCR using BOSH backup and restore (BBR). Follow these instructions from the kubo-disaster-recovery-acceptance-tests repository.
Turbulence tests are tests that introduce failure scenarios via the turbulence release to verify resilience.
- Clone the kubo-ci repository
- Your BOSH director must be deployed with turbulence.
- Please use the turbulence ops-file, and the CFCR ops-file which applies a development version of turbulence. This is unfortunately required until this bug is resolved.
- Upload the turbulence runtime config to your director, and name it turbulence. More details can be found in this CI script. This ensures a turbulence client is deployed on your CFCR cluster VMs.
- Deploy CFCR
- Have a kubeconfig to your running CFCR cluster saved at
~/.kube/config
, or setexport KUBECONFIG=/path/to/your/kubeconfig
- Create a json test config file. Refer to the turbulence test script for further hints.
- Run
CONFIG="/path/to/testconfig" ginkgo -failFast -progress -r "./kubo-ci/src/tests/turbulence-tests/"
Upgrade tests determine whether BOSH can automatically upgrade from the previous released version of CFCR to the latest version.
- Clone the kubo-ci repository
- Deploy CFCR with the previously released version of CFCR
- Create a bash script containing the
bosh deploy -n
instructions you just used to deploy CFCR - Upload the latest release to the BOSH director
- Create a json testconfig file with IaaS, BOSH, and upgrade flags
- Run
BOSH_DEPLOY_COMMAND="path/to/your/bosh-deploy-script.sh" CONFIG="/path/to/your/testconfig" ginkgo -r -v -progress "./kubo-ci/src/tests/upgrade-tests/"