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 WriteAuthUIBundle(repoRoot string, outDir string) error
- func WriteChecksums(outDir string) error
- type BundleFile
- type DeployAssemblyAsset
- type DeployAssemblyCompatibility
- type DeployAssemblyDescriptor
- type DeployAssemblyInstanceInputs
- type DeployAssemblyPayload
- type DeployAssemblyVerification
- type LambdaBundleAsset
- type LambdaBundleInventorySource
- type LambdaBundleManifest
- type LambdaBundleManifestFile
- type LambdaBundleRelease
- type ReleaseArtifacts
- type ReleaseAuthUIBundleRef
- type ReleaseCDK
- type ReleaseDeployArtifacts
- type ReleaseDeployAssemblyRef
- type ReleaseLambdaBundleRef
- type ReleaseManifest
- type ReleaseManifestInput
Constants ¶
const AuthUIBundleArchiveName = "lesser-auth-ui.tar.gz"
AuthUIBundleArchiveName is the published auth UI archive for immutable release-driven deploys.
const ChecksumsFileName = "checksums.txt"
ChecksumsFileName is the published checksum manifest for release assets.
const DeployAssemblyArchiveName = "lesser-deploy-assembly.tar.gz"
DeployAssemblyArchiveName is the published deploy assembly archive for immutable Lesser deploys.
const DeployAssemblyManifestKind = "lesser.deploy_assembly_descriptor"
DeployAssemblyManifestKind identifies Lesser deploy assembly descriptors.
const DeployAssemblyManifestName = "lesser-deploy-assembly.json"
DeployAssemblyManifestName is the published descriptor that identifies the deploy assembly archive and the outer executor contract.
const DeployAssemblyManifestSchemaVersion = 1
DeployAssemblyManifestSchemaVersion is the current schema version for Lesser deploy assembly descriptors.
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 WriteAuthUIBundle ¶ added in v1.2.8
WriteAuthUIBundle writes a deterministic auth UI archive from auth-ui/dist.
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 DeployAssemblyAsset ¶ added in v1.2.8
type DeployAssemblyAsset struct {
Path string `json:"path"`
Format string `json:"format"`
SHA256 string `json:"sha256"`
}
DeployAssemblyAsset describes the published deploy assembly archive.
type DeployAssemblyCompatibility ¶ added in v1.2.8
type DeployAssemblyCompatibility struct {
ReleaseManifestPath string `json:"release_manifest_path"`
DeployArtifactsKey string `json:"deploy_artifacts_key"`
ExecutorContractVersion int `json:"executor_contract_version"`
}
DeployAssemblyCompatibility describes how the deploy assembly hooks into the top-level release manifest and executor contract.
type DeployAssemblyDescriptor ¶ added in v1.2.8
type DeployAssemblyDescriptor struct {
Kind string `json:"kind"`
SchemaVersion int `json:"schema_version"`
Release LambdaBundleRelease `json:"release"`
Assembly DeployAssemblyAsset `json:"assembly"`
Payload DeployAssemblyPayload `json:"payload"`
Compatibility DeployAssemblyCompatibility `json:"compatibility"`
InstanceInputs DeployAssemblyInstanceInputs `json:"instance_inputs"`
Verification DeployAssemblyVerification `json:"verification"`
}
DeployAssemblyDescriptor describes the published deploy assembly archive and the outer executor contract.
func WriteDeployAssembly ¶ added in v1.2.8
func WriteDeployAssembly(repoRoot string, outDir string, version string, gitSHA string) (DeployAssemblyDescriptor, error)
WriteDeployAssembly writes the deploy assembly archive and descriptor into outDir.
type DeployAssemblyInstanceInputs ¶ added in v1.2.8
type DeployAssemblyInstanceInputs struct {
Required []string `json:"required"`
Optional []string `json:"optional"`
}
DeployAssemblyInstanceInputs describes the canonical input-category contract for the deploy assembly.
type DeployAssemblyPayload ¶ added in v1.2.8
type DeployAssemblyPayload struct {
Kind string `json:"kind"`
ContractVersion int `json:"contract_version"`
Entrypoint string `json:"entrypoint"`
}
DeployAssemblyPayload describes the inner deploy assembly payload.
type DeployAssemblyVerification ¶ added in v1.2.8
type DeployAssemblyVerification struct {
IntegrityRequired []string `json:"integrity_required"`
PreflightRequired []string `json:"preflight_required"`
}
DeployAssemblyVerification describes integrity and preflight requirements for the deploy assembly.
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 ReleaseAuthUIBundleRef ¶ added in v1.2.8
ReleaseAuthUIBundleRef points at the published auth UI bundle.
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"`
AuthUIBundle ReleaseAuthUIBundleRef `json:"auth_ui_bundle"`
DeployAssembly ReleaseDeployAssemblyRef `json:"deploy_assembly"`
}
ReleaseDeployArtifacts describes artifacts consumed during deployment.
type ReleaseDeployAssemblyRef ¶ added in v1.2.8
type ReleaseDeployAssemblyRef struct {
Path string `json:"path"`
ManifestPath string `json:"manifest_path"`
ManifestKind string `json:"manifest_kind"`
ManifestSchemaVersion int `json:"manifest_schema_version"`
}
ReleaseDeployAssemblyRef points at the published deploy assembly assets.
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.