Third-party plugins#
A third-party plugin adds step types that kevin does not ship. You can find plugins in an index, a git repository that lists plugins and their releases.
Add an index#
kevin plugin index add https://github.com/kevin-env/kevin-plugin-index --as kevin-envkevin clones the repository and prints the number of plugins it found. Without --as <alias>, the index gets an alias derived from the URL.
To see your indexes, run kevin plugin index list. To get new releases, run kevin plugin index update.
Find a plugin#
kevin plugin search echoEach result shows <alias>/<name>, a summary, and the latest version. With no query, search lists every plugin.
To see the versions of a plugin and the plugins: entry for the latest one:
kevin plugin index show echoname echo
summary an example plugin that prints a message
homepage https://kevin-env.dev
maintainer Justen Walker
repo kevin-env (https://github.com/kevin-env/kevin-plugin-index)
version 0.1.0 (latest)
plugins: {
echo: {
oci: "ghcr.io/kevin-env/kevin/plugin-echo:0.1.0"
signing: {
scheme: "minisign"
}
}
}If two indexes have a plugin with the same name, the command fails and lists the aliases. Use <alias>/<name>, for example kevin-env/echo.
Install a plugin#
kevin plugin index install echotrusted 65a4ca28b7921128
installed echo 0.1.0install does two things:
- Adds the signers that the plugin’s index entry declares to your trust store.
- Adds the
plugins:entry to your environment file.
To install an older release, add --version 0.1.0. The version must match exactly. To review the signer before you trust it, add --no-trust, then trust it yourself (see below).
install fails if the environment file already declares a plugin with that name, or if the file is package-mode CUE. In those cases, copy the entry from kevin plugin index show into the file yourself.
Trust a signer yourself#
Do this when you add a plugins: entry by hand, or used --no-trust.
For a minisign package, add the signer’s public key file:
kevin plugin trust add ./signer.pubFor a sigstore package, add the identity and issuer from the plugin’s signing: block:
kevin plugin trust add-identity \
--identity ci@acme.example \
--issuer https://token.actions.githubusercontent.comCheck the result with kevin plugin trust list.
Fetch from a registry with a private CA#
Do this when an oci: or http: source uses a certificate that your system does not trust.
Save the CA certificate as a PEM file.
Set
KEVIN_PLUGIN_CA_FILEto that file:export KEVIN_PLUGIN_CA_FILE=$PWD/registry-ca.pem
kevin trusts the certificates in the file in addition to your system roots. This applies to kevin run, kevin plugin push, and any other command that fetches a package. It does not apply to cosign when it verifies a sigstore signature.
Use the plugin#
Add a step that uses a step type of the plugin:
env: db: { uses: "echo:echo" with: { // fields from the plugin's documentation } }Download the plugin and verify its signature:
kevin initCheck the environment file against the plugin’s schema:
kevin validate
The plugin’s documentation lists its step types and their with fields.
Related#
- Environment file: plugins
kevin plugin- Plugin trust: what an index does and does not guarantee.