Overview
Release metadata is stored as JSON in therelease_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:
-f:
.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. Settype: 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:
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 bycreate 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:
--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.
Creating releases with metadata
You can create releases with metadata using the Ryvn CLI. The metadata can be provided via a file or inline:- CLI with File
- CLI with Inline
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.Managing container image versions in Helm
Managing container image versions in Helm
When deploying with Helm charts, there are typically two common patterns for versioning and pulling images:When you create a release, Ryvn uses that version for both the chart and the default image tag:Alternatively, reference it directly in your Helm chart using 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.
Approach 1: Match image tag with chart version (recommended)
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’sAppVersion: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:.Values.ryvn: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 withminVersion 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)
Version range examples
Version range examples
Defining dependencies
Add dependencies to your release metadata using version ranges:Dependency resolution
Ryvn automatically resolves dependencies during deployment:- Order calculation: Determines the optimal deployment order
- Health checks: Ensures dependent services are healthy before proceeding
- Rollback coordination: Handles rollbacks across dependent services
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
Artifact not found
Artifact not found
Ensure the artifact repository and tag are accessible from Ryvn’s infrastructure. Check registry credentials and network connectivity.
Dependency resolution failed
Dependency resolution failed
Verify that all dependent services exist and are accessible. Check version compatibility and service health.
Metadata validation errors
Metadata validation errors
Check the metadata format against the schema. Ensure all required fields are present and valid.