Name: test-infra
Owner: Kubernetes
Description: Test infrastructure for the Kubernetes project.
Created: 2016-04-28 21:05:35.0
Updated: 2018-01-15 10:14:00.0
Pushed: 2018-01-17 22:47:58.0
Homepage: null
Size: 37618
Language: Go
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
The test-infra repository contains a collection of tools for testing Kubernetes and displaying Kubernetes tests results. See also CONTRIBUTING.md.
See the architecture diagram for an overview of how the different services interact.
Test anything with the following pattern:
clone https://github.com/kubernetes/test-infra
-infra/jenkins/bootstrap.py --job=J --repo=R --service-account=S.json --upload=gs://B
The --job=J
flag specifies what test job to run.
The --repo=R
(or --bare
) flag controls what we check out from git.
Anyone can reconfigure our CI system with a test-infra PR that updates the appropriate files. Detailed instructions follow:
Our e2e testing uses kubetest to build/deploy/test kubernetes clusters on various providers. Please see those documents for additional details about this tool as well as e2e testing generally.
Create a PR in this repo to add/update/remove a job or suite. Specifically you'll need to do the following:
jobs/config.json
for the jobjobs/env/FOO.env
filejobs/config.json
for a dedicated project, make sure the project has the right IAM grantstest_groups
list in testgrid/config.yaml
dashboard_tab
prow/config.yaml
jenkins/job-configs
NOTE: kubernetes/kubernetes
and kubernetes-security/kubernetes
must have matching presubmits.
Please test the job on your local workstation before creating a PR:
r /tmp/whatever && cd /tmp/whatever
ATH/src/k8s.io/test-infra/jenkins/bootstrap.py \
job=J \ # aka your new job
repo=R1 --repo=R2 \ # what repos to check out
service-account ~/S.json # the service account to use to launch GCE/GKE clusters
te: create a service account at the cloud console for the project J uses
Release branch jobs and image validation jobs are defined in test_config.yaml. We test different master/node image versions against multiple k8s branches on different features.
Those jobs are using channel based versions, current supported testing map is:
Our build job will generate a ci/(channel-name) file pointer in gcs.
After you update test_config.yaml, please run
l run //experiment:generate_tests -- --yaml-config-path=experiment/test_config.yaml --json-config-path=jobs/config.json --prow-config-path=prow/config.yaml && bazel run //jobs:config_sort
to regenerate the job configs.
We are moving towards making more jobs to fit into the generated config.
Presubmit will tell you if you forget to do any of this correctly.
Merge your PR and @k8s-ci-robot will deploy your change automatically.
Largely similar to creating a new job, except you can just modify the existing entries rather than adding new ones.
Update what a job does by editing its definition in jobs/config.json
. For
the kubetest jobs this typically means editing the jobs/FOO.env
files it uses.
Update when a job runs by changing its definition in prow/config.yaml
.
The test-infra oncall must push prow changes (make -C prow update-config
).
Update where the job appears on testgrid by changing testgrid/config.yaml
.
The reverse of creating a new job: delete the appropriate entries in
jobs/config.json
, prow/config.yaml
and testgrid/config.yaml
.
Merge your PR and @k8s-ci-robot will deploy your change automatically.
We use Bazel to build and test the code in this repo.
The commands bazel build //...
and bazel test //...
should be all you need
for most cases. If you modify Go code, run ./hack/update-bazel.sh
to keep
BUILD.bazel
files up-to-date.
The Kubernetes project encourages organizations to contribute execution of e2e test jobs for a variety of platforms (e.g., Azure, rktnetes). For information about how to contribute test results, see Contributing Test Results.