Skip to main content
Release metadata allows you to define additional information about your service releases that Ryvn uses for automated deployment, dependency management, and migration path computation. This includes container artifacts, service dependencies, and database migration schemas.

Overview

Release metadata is stored as JSON in the release_metadata field of each service release. This metadata helps Ryvn:
  • Track exact artifacts used in each release (container images, Helm charts, etc.)
  • Manage service dependencies and ensure proper deployment order
  • Enable automated rollbacks with confidence

File location

Create a file named <service-name>-release.ryvn.yaml at the root of your repository. The CLI automatically discovers this file when creating a release — no flags needed. For example, if your service is called my-service:
You can also point to a file explicitly with -f:
The file can be YAML (.yaml, .yml) or JSON (.json).

Release artifacts

Release artifacts define the exact artifacts (like container images) that are part of a release. This ensures reproducible deployments and enables Ryvn to track what’s actually running in each environment.

Container image artifacts

For web server and Docker image services, you can specify the exact container images used in a release:
digest is the image’s immutable identity. A tag can be moved to different content later; a digest cannot, so a release that records one always refers to the exact bytes that were published. For a multi-platform image it is the digest of the image index, not of one platform’s manifest. Releases built with ryvn-build-action record the digest automatically. If you create releases yourself, pass the digest your push reported (for example docker buildx build --push prints it, and docker buildx imagetools inspect <image>:<tag> shows what a tag currently resolves to). Ryvn validates the format (sha256: followed by 64 lowercase hex characters) and rejects anything else, including other digest algorithms.
Releases created without a digest keep working exactly as before. Ryvn does not back-fill one by resolving the tag later, because by then the tag might point at different content than the release was built from.

Helm chart artifacts

For Helm chart services, an artifact can also be a published chart. Set type: helm-chart (entries without a type are treated as images) and Ryvn records the chart’s OCI repository, name, version, and digest:
ryvn push chart <package> --service <name> -o artifact prints this entry for the chart it just published.

Generating an artifact inventory

A Helm chart usually pulls several container images that are not listed anywhere in your release metadata. ryvn create release-file renders the chart, finds every image reference in the rendered manifests, resolves each image’s digest from its registry, and writes a complete release file you can inspect and then publish:
The generated file names the service and version, lists the chart and every discovered image with its digest, and marks the chart as the primaryArtifact (the artifact whose version is the release version):
--chart accepts an oci:// reference, a chart directory, or a packaged .tgz; when omitted, the chart destination configured on the service definition is used. Pass the same values you deploy with (-f values.yaml, --set key=value) so conditional templates render the images you actually run, and --artifacts-file to include artifacts the chart does not reference (for example a chart you published locally). Registry access uses your existing Docker and Helm credentials (docker login, helm registry login, or ryvn create registry-config); public registries need no credentials. An existing <service>-release.ryvn.yaml beside the build can contribute dependencies, migrations, and labels to the generated inventory. It must not define artifacts: the build generates them, and the command fails if it does. create release-file supports Helm chart services only. For web server and job services the inventory is the single image you built, which ryvn describe image <ref> --service <name> -o artifact produces.

Immutable release artifacts

A release file produced by create release-file is an immutable inventory: every artifact carries a digest, and Ryvn rejects the release if any is missing rather than resolving tags later. To get the same guarantee when you assemble the artifacts yourself, pass --inventory:
Ryvn then requires every artifact to have an OCI repository and digest, and picks the primary artifact automatically when there is exactly one image (web server and job services) or exactly one chart matching the service’s chart destination (Helm services); pass --primary-artifact <name> otherwise. Environments that mirror artifacts into a private registry copy exactly the digests recorded in the inventory before installing the release, so a complete inventory is what makes those mirrors work for images your chart pulls from public registries.
Releases created by ryvn-build-action are immutable inventories automatically: it runs create release-file for Helm chart services, and for container services passes the describe image artifact to create release --inventory.If your chart does not render with its default values or outside a specific namespace, set render_values_files, render_set_values, and render_namespace on the action or the release.yml reusable workflow. They are forwarded to create release-file as -f, --set, and --namespace, and affect only the inventory render.

Creating releases with metadata

You can create releases with metadata using the Ryvn CLI. The metadata can be provided via a file or inline:
release-metadata.yaml:
The metadata file can be in YAML or JSON format. When using the -f flag, Ryvn will automatically detect the format based on the file extension. The --metadata flag expects JSON format for inline metadata.
When deploying with Helm charts, there are typically two common patterns for versioning and pulling images:The simplest approach is to keep your container image tag synchronized with your Helm chart version. This makes reasoning easier since the chart version and image version are always the same.Configure your Helm templates to use the chart’s AppVersion:
When you create a release, Ryvn uses that version for both the chart and the default image tag:

Approach 2: Decouple chart and image versions

If you need different versions for your chart and container image, specify the exact image in release metadata and reference it in your configuration.Step 1: Reference the artifact in your installation config:
Alternatively, reference it directly in your Helm chart using .Values.ryvn:
Step 2: Create release with artifact metadata:
Ryvn automatically passes release metadata as values, ensuring the correct container image is deployed regardless of the chart version.
For teams migrating from imperative CD pipelines (like GitHub Actions), Approach 1 provides the smoothest transition—just version your images to match your chart versions.

Service dependencies

Service dependencies define the relationships between services and ensure proper deployment order. This is crucial for complex applications with multiple interconnected services.

Dependency types

Ryvn supports several types of service dependencies:
  • Database dependencies: Services that require a database to be available
  • API dependencies: Services that depend on other services’ APIs
  • Infrastructure dependencies: Services that require specific infrastructure components

Version range format

Dependencies use version ranges with minVersion and maxVersion fields:
  • Exact version: minVersion: "2.1.0", maxVersion: "2.1.0"
  • Version range: minVersion: "2.0.0", maxVersion: "3.0.0"
  • Wildcard support: minVersion: "2.0.0", maxVersion: "3.x.x" (any 3.x.x version)
  • Unbounded range: minVersion: "2.0.0", maxVersion: "*" (any version >= 2.0.0)

Defining dependencies

Add dependencies to your release metadata using version ranges:
Release dependencies say which versions of other services a release works with, and they travel with the release. To order first installs in an environment, or to point a release’s range at one specific installation when a service has several, declare dependencies on the installation instead. See Installation dependencies.

Dependency resolution

Ryvn automatically resolves dependencies during deployment:
  1. Order calculation: Determines the optimal deployment order
  2. Health checks: Ensures dependent services are healthy before proceeding
  3. Rollback coordination: Handles rollbacks across dependent services
Dependencies must be satisfied before a service can be deployed. Ryvn will block deployments if dependencies are unavailable or unhealthy.

Migration schemas

Migration schemas define which database schema versions are supported by the current release. This enables Ryvn to compute valid migration paths and prevent rollbacks to unsupported schema versions.

Schema version support

Each release specifies a list of supported schema versions:
  • Current schema versions: The schema versions that this release supports
  • Migration path validation: Ryvn ensures rollbacks only target supported schema versions
  • Version compatibility: Prevents deployment to releases with incompatible schemas

Migration schema format

Troubleshooting

Common issues

Ensure the artifact repository and tag are accessible from Ryvn’s infrastructure. Check registry credentials and network connectivity.
Verify that all dependent services exist and are accessible. Check version compatibility and service health.
Check the metadata format against the schema. Ensure all required fields are present and valid.

Debugging metadata

Use Ryvn’s CLI to inspect release metadata: