Skip to content
openshift-engPublic

About

Kubernetes Integration Testing CI Harness

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

12 Commits

Folders and files

Repository files navigation

kit-ci

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.

Status

Early development. Today kit-ci can find and extract the test binaries a payload carries; running them comes next.

Configuration

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-operator

sources 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, or
  • binary, 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-ext

Commands

kit-ci payload references --release "$PAYLOAD"   # the components a payload ships
kit-ci payload extract                           # the test binaries of the configured sources

Extracted 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.

Build

make build
bin/kit-ci version

make verify runs the linter, the tests and the dependency check, the same way CI does.

About

Kubernetes Integration Testing CI Harness

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages