release

package
v0.2.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 1, 2026 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ProductName                         = "Sheaft"
	UpstreamProducer                    = "Bering"
	CompatibilityManifestSchemaVersion  = "1.0.0"
	ReleaseManifestSchemaVersion        = "1.0.0"
	DefaultCompatibilityManifestPath    = "compatibility-manifest.json"
	DefaultReleaseManifestPath          = "release-manifest.json"
	DefaultCompatibilitySchemaPath      = "api/schema/compatibility-manifest.schema.json"
	DefaultReleaseSchemaPath            = "api/schema/release-manifest.schema.json"
	DefaultConfigPackSourceListPath     = "release/packs/default-config-pack.files.txt"
	DefaultConfigPackMetadataOutputPath = "dist/default-config-pack.json"
)

Variables

This section is empty.

Functions

func PackageDefaultConfigPack

func PackageDefaultConfigPack(repositoryRoot, sourceListPath, version, archivePath, metadataPath string) error

func ValidateChart

func ValidateChart(chartDir string) error

func WriteChartMetadata

func WriteChartMetadata(repositoryRoot, path, name, version, archivePath, ociReference, digest string, published bool) error

func WriteCompatibilityManifest

func WriteCompatibilityManifest(path string) error

func WriteImageMetadata

func WriteImageMetadata(path, repository string, tags, platforms []string, published bool, digest string) error

func WriteReleaseManifest

func WriteReleaseManifest(opts ReleaseManifestOptions) error

Types

type AssetReference

type AssetReference struct {
	Path   string `json:"path"`
	SHA256 string `json:"sha256"`
}

type ChartDefinition

type ChartDefinition struct {
	APIVersion string `yaml:"apiVersion"`
	Name       string `yaml:"name"`
	Type       string `yaml:"type"`
	Version    string `yaml:"version"`
	AppVersion string `yaml:"appVersion"`
}

type ChartMetadata

type ChartMetadata struct {
	SchemaVersion string         `json:"schema_version"`
	Name          string         `json:"name"`
	Version       string         `json:"version"`
	Published     bool           `json:"published"`
	Archive       AssetReference `json:"archive"`
	OCIReference  string         `json:"oci_reference,omitempty"`
	Digest        string         `json:"digest,omitempty"`
}

type CompatibilityContract

type CompatibilityContract struct {
	ArtifactType  string `json:"artifact_type"`
	SchemaName    string `json:"schema_name"`
	SchemaVersion string `json:"schema_version"`
	SchemaURI     string `json:"schema_uri"`
	SchemaDigest  string `json:"schema_digest"`
}

type CompatibilityManifest

type CompatibilityManifest struct {
	Schema                          string                  `json:"$schema"`
	SchemaVersion                   string                  `json:"schema_version"`
	ProductName                     string                  `json:"product_name"`
	DownstreamConsumerOf            string                  `json:"downstream_consumer_of"`
	StrictContractValidation        bool                    `json:"strict_contract_validation"`
	SupportedUpstreamArtifactTypes  []string                `json:"supported_upstream_artifact_types"`
	SupportedUpstreamSchemaNames    []string                `json:"supported_upstream_schema_names"`
	SupportedUpstreamSchemaVersions []string                `json:"supported_upstream_schema_versions"`
	SupportedContracts              []CompatibilityContract `json:"supported_contracts"`
	TestedBeringAppVersions         []string                `json:"tested_bering_app_versions"`
}

func GenerateCompatibilityManifest

func GenerateCompatibilityManifest() CompatibilityManifest

func ReadCompatibilityManifest

func ReadCompatibilityManifest(path string) (CompatibilityManifest, error)

func (CompatibilityManifest) Validate

func (m CompatibilityManifest) Validate() error

type DefaultConfigPackMetadata

type DefaultConfigPackMetadata struct {
	SchemaVersion string         `json:"schema_version"`
	Name          string         `json:"name"`
	Version       string         `json:"version"`
	Archive       AssetReference `json:"archive"`
	Files         []string       `json:"files"`
}

type ImageReference

type ImageReference struct {
	Reference string `json:"reference"`
}

type OCIImageMetadata

type OCIImageMetadata struct {
	SchemaVersion string           `json:"schema_version"`
	Repository    string           `json:"repository"`
	Tags          []string         `json:"tags"`
	Platforms     []string         `json:"platforms"`
	Published     bool             `json:"published"`
	Digest        string           `json:"digest,omitempty"`
	References    []ImageReference `json:"references"`
}

type ReleaseBinary

type ReleaseBinary struct {
	OS      string          `json:"os"`
	Arch    string          `json:"arch"`
	Archive AssetReference  `json:"archive"`
	SBOM    *AssetReference `json:"sbom,omitempty"`
}

type ReleaseManifest

type ReleaseManifest struct {
	Schema                string                      `json:"$schema"`
	SchemaVersion         string                      `json:"schema_version"`
	ProductName           string                      `json:"product_name"`
	AppVersion            string                      `json:"app_version"`
	GitCommit             string                      `json:"git_commit"`
	BuildDate             string                      `json:"build_date"`
	Binaries              []ReleaseBinary             `json:"binaries"`
	ChecksumsFile         AssetReference              `json:"checksums_file"`
	OCIImages             []OCIImageMetadata          `json:"oci_images"`
	Chart                 ChartMetadata               `json:"chart"`
	CompatibilityManifest AssetReference              `json:"compatibility_manifest"`
	DefaultConfigPacks    []DefaultConfigPackMetadata `json:"default_config_packs"`
}

func GenerateReleaseManifest

func GenerateReleaseManifest(opts ReleaseManifestOptions) (ReleaseManifest, error)

func (ReleaseManifest) Validate

func (m ReleaseManifest) Validate() error

type ReleaseManifestOptions

type ReleaseManifestOptions struct {
	RepositoryRoot            string
	DistDir                   string
	OutputPath                string
	AppVersion                string
	GitCommit                 string
	BuildDate                 string
	CompatibilityManifestPath string
	DefaultConfigPackMetadata string
	ImageMetadataPath         string
	ChartMetadataPath         string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL