This doc explains how to setup a development environment so you can get started
contributing to Knative Test Infra
.
Also take a look at:
Before submitting a PR, see also CONTRIBUTING.md.
Start by creating a GitHub account, then setup GitHub access via SSH.
To check out this repository:
- Create your own fork of this repo
- Clone it to your machine:
mkdir -p ${GOPATH}/src/knative.dev
cd ${GOPATH}/src/knative.dev
git clone [email protected]:${YOUR_GITHUB_USERNAME}/test-infra.git
cd test-infra
git remote add upstream https://github.com/knative/test-infra.git
git remote set-url --push upstream no_push
Adding the upstream
remote sets you up nicely for regularly
syncing your fork.
As you make changes to the code-base, there are two special cases to be aware of:
-
If you change an input to generated code, then you must run
./hack/update-codegen.sh
. Inputs include:-
Prow configs templates prow/jobs_config.
-
Prow configs generator tools/configgen.
-
-
If you change a package's deps (including adding an external dependency), then you must run
./hack/update-deps.sh
.
These are both idempotent, and we expect that running these at HEAD
to have no
diffs. Code generation and dependencies are automatically checked to produce no
diffs for each pull request.
update-deps.sh runs go get/mod command. In some cases, if newer dependencies are required, you need to run "go get" manually.
To update existing dependencies execute
./hack/update-deps.sh --upgrade && ./hack/update-codegen.sh