Skip to content
Integrations

Publish snapshots from CI

Publish installable Kubb Studio snapshots from GitHub Actions, GitLab CI, or any other provider and review generated-file changes.

kubb studio snapshot generates a package on a CI runner, uploads it to Studio in one request, and exits. Run it on pull or merge requests and on the default branch so reviewers can compare their output.

Supported providers

ProviderAgent identityGuide
GitHub ActionsDetectedPublish snapshots with GitHub Actions
GitLab CIDetectedPublish snapshots with GitLab CI
Bitbucket Pipelines, CircleCIDetected. Pass --base-id to compare with a branchRun kubb studio snapshot with KUBB_TOKEN set
OtherPass --id and --base-idSee below

Every provider needs an organization CI API key stored as KUBB_TOKEN. Snapshot installation uses a separate registry API key. Create both in Studio under Settings > Developer > Tokens.

Snapshots expire after seven days. Schedule a default-branch run if it can go a week without a push.

Other CI providers

For a provider without automatic agent identification, use a stable --id on the base branch and pass it as --base-id on pull request runs:

Terminal
kubb studio snapshot --id jenkins:api:main                              # on main
kubb studio snapshot --id jenkins:api:pr-12 --base-id jenkins:api:main  # on a pull request

Use kubb studio snapshot --json | jq -r '.url' to pass the tarball URL to another step. See CI agent identity and Snapshot output for the result fields.

Install the snapshot

Configure the registry API key, then run the install command from the snapshot result:

.npmrc
//kubb.studio/:_authToken=${KUBB_REGISTRY_TOKEN}
Terminal
npm i https://kubb.studio/packages/<agent>/<package>.tgz

See also