Documentation
¶
Overview ¶
Package releaseassets builds the immutable release artifacts published for Lesser deployments.
Index ¶
- Constants
- func CanonicalLambdaNames(repoRoot string) ([]string, error)
- func PublishedReleaseAssetNames() []string
- func WriteChecksums(outDir string) error
- type BundleFile
- type LambdaBundleAsset
- type LambdaBundleInventorySource
- type LambdaBundleManifest
- type LambdaBundleManifestFile
- type LambdaBundleRelease
- type ReleaseArtifacts
- type ReleaseCDK
- type ReleaseDeployArtifacts
- type ReleaseLambdaBundleRef
- type ReleaseManifest
- type ReleaseManifestInput
Constants ¶
const ChecksumsFileName = "checksums.txt"
ChecksumsFileName is the published checksum manifest for release assets.
const LambdaBundleArchiveName = "lesser-lambda-bundle.tar.gz"
LambdaBundleArchiveName is the published tarball that contains the Lambda zip artifacts for a release.
const LambdaBundleManifestKind = "lesser.lambda_bundle_manifest"
LambdaBundleManifestKind identifies Lesser Lambda bundle manifest documents.
const LambdaBundleManifestName = "lesser-lambda-bundle.json"
LambdaBundleManifestName is the published manifest that describes the Lambda bundle contents.
const LambdaBundleManifestSchemaVersion = 1
LambdaBundleManifestSchemaVersion is the current schema version for Lambda bundle manifests.
const LambdaInventoryKind = "lesser.lambda_inventory"
LambdaInventoryKind identifies the lambda inventory source document kind.
const LambdaInventoryPath = "infra/cdk/inventory/lambdas.go"
LambdaInventoryPath is the canonical lambda inventory source used to define the published bundle contents.
const ReleaseDeployArtifactsSchemaVersion = 1
ReleaseDeployArtifactsSchemaVersion is the current schema version for the deploy artifact section in the top-level release manifest.
const ReleaseManifestName = "lesser-release.json"
ReleaseManifestName is the published top-level release manifest filename.
Variables ¶
This section is empty.
Functions ¶
func CanonicalLambdaNames ¶
CanonicalLambdaNames returns the sorted canonical Lambda names declared in the CDK inventory.
func PublishedReleaseAssetNames ¶ added in v1.2.6
func PublishedReleaseAssetNames() []string
PublishedReleaseAssetNames returns the canonical published release asset set.
func WriteChecksums ¶
WriteChecksums writes checksums.txt for the full published release asset set.
Types ¶
type BundleFile ¶
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 ¶
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.