kit-ci runs integration tests against ephemeral
kit
clusters.
It takes a release payload, finds the openshift-tests-extension (OTE) binaries its components ship, creates the clusters those tests need through the kit daemon, runs the tests and reports the results.
kit-ci is a consumer of kit, not part of it: it lives in its own
repository and talks to the daemon through the public
kubernetes-integration-testing/daemon module.
Early development. Today kit-ci can find and extract the test binaries a payload carries; running them comes next.
A run is described by a kit-ci.yaml committed next to the tests:
version: v1
release: quay.io/openshift-release-dev/ocp-release:4.20.0-x86_64
sources:
- component: machine-config-operatorsources is explicit on purpose: kit-ci never scans a payload looking
for tests. Each entry names one of
component, a component of the release payload, named as its tag in the payload's image references,image, a container image used directly, without a payload, which is what a pull request job has at hand, orbinary, a test binary already on the local filesystem.
Inside an image, kit-ci locates the test binary by convention: at the
filesystem root or in /usr/bin, with a name ending in -ext or
-tests, optionally gzipped. That covers every extension the payload
ships today. A source that needs something else declares path
explicitly, and the convention is not consulted.
The command line patches the file, which is how a CI job aims a committed configuration at the payload it just built:
kit-ci payload extract --release "$PAYLOAD" # same sources, new payload
kit-ci payload extract --component machine-config-operator # replaces the sources
kit-ci payload extract --image quay.io/mco/mco:pr-123
kit-ci payload extract --binary ./bin/machine-config-tests-extkit-ci payload references --release "$PAYLOAD" # the components a payload ships
kit-ci payload extract # the test binaries of the configured sourcesExtracted binaries are decompressed, made executable and kept in
~/.local/share/openshift-kit-ci/cache, keyed by the digest of the
image they came from, so a payload is downloaded once. --no-cache
extracts into a throwaway directory instead.
Credentials come from --pull-secret, then $REGISTRY_AUTH_FILE, then
the ambient docker configuration.
make build
bin/kit-ci versionmake verify runs the linter, the tests and the dependency check, the
same way CI does.