This doc explains the development workflow so you can get started contributing to Kritis.
Before getting started, don't forget to join the kritis-users mailing list!
First you will need to setup your GitHub account and create a fork:
Once you have those, you can iterate on kritis:
When you're ready, you can create a PR!
The Go tools require that you clone the repository to the src/github.com/grafeas/kritis
directory
in your GOPATH
.
To check out this repository:
- Create your own fork of this repo
- Clone it to your machine:
mkdir -p ${GOPATH}/src/github.com/grafeas
cd ${GOPATH}/src/github.com/grafeas
git clone git@github.com:${YOUR_GITHUB_USERNAME}/kritis.git
cd kritis
git remote add upstream git@github.com:grafeas/kritis.git
git remote set-url --push upstream no_push
Adding the upstream
remote sets you up nicely for regularly syncing your
fork.
kritis has both unit tests and integration tests.
The unit tests live with the code they test and can be run with:
make test
$GOPATH
.
On a GCP project where Kritis has already been installed (follow instructions), this will prepare a new cluster named kritis-integration-test
:
make -e GCP_PROJECT=${PROJECT} setup-integration-local
NOTE: the PROJECT
here is from the installation instructions environment
variable.
As you develop, you can build new test images and run the integration test on demand:
make -e GCP_PROJECT=${PROJECT} integration-local
NOTE: you'll be charged for using GCP resource to run integration tests. See Free Tier for information on how to try out GCP. Alternatively, you can choose to have the integration tests run as part of the PR instead. Fixes to the testing infrastructure to address this problem are WIP.
When you have changes you would like to propose to kritis, you will need to:
- Ensure the commit message(s) describe what issue you are fixing and how you are fixing it (include references to issue numbers if appropriate)
- Create a pull request
Each PR must be reviewed by a maintainer. This maintainer will add the kokoro:run
label
to a PR to kick of the integration tests, which must pass for the PR
to be submitted.