releaseassets

package
v1.2.5 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2026 License: AGPL-3.0 Imports: 14 Imported by: 0

Documentation

Overview

Package releaseassets builds the immutable release artifacts published for Lesser deployments.

Index

Constants

View Source
const ChecksumsFileName = "checksums.txt"

ChecksumsFileName is the published checksum manifest for release assets.

View Source
const LambdaBundleArchiveName = "lesser-lambda-bundle.tar.gz"

LambdaBundleArchiveName is the published tarball that contains the Lambda zip artifacts for a release.

View Source
const LambdaBundleManifestKind = "lesser.lambda_bundle_manifest"

LambdaBundleManifestKind identifies Lesser Lambda bundle manifest documents.

View Source
const LambdaBundleManifestName = "lesser-lambda-bundle.json"

LambdaBundleManifestName is the published manifest that describes the Lambda bundle contents.

View Source
const LambdaBundleManifestSchemaVersion = 1

LambdaBundleManifestSchemaVersion is the current schema version for Lambda bundle manifests.

View Source
const LambdaInventoryKind = "lesser.lambda_inventory"

LambdaInventoryKind identifies the lambda inventory source document kind.

View Source
const LambdaInventoryPath = "infra/cdk/inventory/lambdas.go"

LambdaInventoryPath is the canonical lambda inventory source used to define the published bundle contents.

View Source
const ReleaseDeployArtifactsSchemaVersion = 1

ReleaseDeployArtifactsSchemaVersion is the current schema version for the deploy artifact section in the top-level release manifest.

View Source
const ReleaseManifestName = "lesser-release.json"

ReleaseManifestName is the published top-level release manifest filename.

Variables

This section is empty.

Functions

func CanonicalLambdaNames

func CanonicalLambdaNames(repoRoot string) ([]string, error)

CanonicalLambdaNames returns the sorted canonical Lambda names declared in the CDK inventory.

func WriteChecksums

func WriteChecksums(outDir string) error

WriteChecksums writes checksums.txt for the full published release asset set.

Types

type BundleFile

type BundleFile struct {
	Lambda     string
	SourcePath string
	Path       string
	SizeBytes  int64
}

BundleFile describes one Lambda zip file included in the release bundle.

func CollectBundleFiles

func CollectBundleFiles(repoRoot string) ([]BundleFile, error)

CollectBundleFiles resolves the canonical Lambda zip files that must be included in the published release bundle.

func WriteLambdaBundle

func WriteLambdaBundle(repoRoot string, outDir string) ([]BundleFile, error)

WriteLambdaBundle writes the deterministic Lambda bundle archive into outDir and returns the files that were included.

type LambdaBundleAsset

type LambdaBundleAsset struct {
	Path   string `json:"path"`
	Format string `json:"format"`
	SHA256 string `json:"sha256"`
}

LambdaBundleAsset describes the published Lambda bundle archive.

type LambdaBundleInventorySource

type LambdaBundleInventorySource struct {
	Path string `json:"path"`
	Kind string `json:"kind"`
}

LambdaBundleInventorySource identifies the canonical inventory that defined the expected Lambda set.

type LambdaBundleManifest

type LambdaBundleManifest struct {
	Kind            string                      `json:"kind"`
	SchemaVersion   int                         `json:"schema_version"`
	Release         LambdaBundleRelease         `json:"release"`
	Bundle          LambdaBundleAsset           `json:"bundle"`
	InventorySource LambdaBundleInventorySource `json:"inventory_source"`
	Files           []LambdaBundleManifestFile  `json:"files"`
}

LambdaBundleManifest describes the published Lambda bundle asset and its contents.

func WriteLambdaBundleManifest

func WriteLambdaBundleManifest(outDir string, version string, gitSHA string, files []BundleFile) (LambdaBundleManifest, error)

WriteLambdaBundleManifest writes the published metadata document that describes the Lambda bundle archive and each bundled Lambda zip.

type LambdaBundleManifestFile

type LambdaBundleManifestFile struct {
	Path      string `json:"path"`
	Lambda    string `json:"lambda"`
	SHA256    string `json:"sha256"`
	SizeBytes int64  `json:"size_bytes"`
}

LambdaBundleManifestFile records metadata for one Lambda zip in the bundle.

type LambdaBundleRelease

type LambdaBundleRelease struct {
	Name    string `json:"name"`
	Version string `json:"version"`
	GitSHA  string `json:"git_sha"`
}

LambdaBundleRelease identifies the release that produced a Lambda bundle.

type ReleaseArtifacts

type ReleaseArtifacts struct {
	ReceiptSchemaVersion int                    `json:"receipt_schema_version"`
	DeployArtifacts      ReleaseDeployArtifacts `json:"deploy_artifacts"`
}

ReleaseArtifacts groups the published release assets metadata.

type ReleaseCDK

type ReleaseCDK struct {
	Major int `json:"major"`
}

ReleaseCDK records CDK compatibility metadata for the release.

type ReleaseDeployArtifacts

type ReleaseDeployArtifacts struct {
	SchemaVersion int                    `json:"schema_version"`
	LambdaBundle  ReleaseLambdaBundleRef `json:"lambda_bundle"`
}

ReleaseDeployArtifacts describes artifacts consumed during deployment.

type ReleaseLambdaBundleRef

type ReleaseLambdaBundleRef struct {
	Path                  string `json:"path"`
	ManifestPath          string `json:"manifest_path"`
	ManifestKind          string `json:"manifest_kind"`
	ManifestSchemaVersion int    `json:"manifest_schema_version"`
}

ReleaseLambdaBundleRef points at the published Lambda bundle assets.

type ReleaseManifest

type ReleaseManifest struct {
	Schema    int              `json:"schema"`
	Name      string           `json:"name"`
	Version   string           `json:"version"`
	GitSHA    string           `json:"git_sha"`
	GoVersion string           `json:"go_version"`
	CDK       ReleaseCDK       `json:"cdk"`
	Artifacts ReleaseArtifacts `json:"artifacts"`
}

ReleaseManifest describes the full published release metadata.

func WriteReleaseManifest

func WriteReleaseManifest(outDir string, input ReleaseManifestInput) (ReleaseManifest, error)

WriteReleaseManifest writes the top-level release manifest into outDir.

type ReleaseManifestInput

type ReleaseManifestInput struct {
	Version              string
	GitSHA               string
	GoVersion            string
	CDKMajor             int
	ReceiptSchemaVersion int
}

ReleaseManifestInput supplies the values required to write the release manifest.

Jump to

Keyboard shortcuts

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