Documentation ¶
Overview ¶
Package packages provides abstract tools for managing a packaged release.
Package packages provides abstract tools for managing a packaged release.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Asset ¶
Asset provides an abstract interface for describing a resource which should be stored on the disk.
func CollectReleaseAssets ¶
type AssetFilter ¶
type AssetFilter struct { // IncludeArtifacts is a set of regep patterns to select which artifacts // from a release should be downloaded and included. If no IncludeArtifacts // are supplied, all files from the release will be included. IncludeArtifacts []string `json:"include"` // ExcludeArtifacts is a set of regexp patterns to remove artifacts which // would otherwise be selected by IncludeArtifacts. ExcludeArtifacts []string `json:"exclude,omitempty"` // Rename provides a mechanism to remap artifacts from one filename to // another. Rename map[string]string }
AssetFilter provides an interface for selecting and managing assets within a release.
func (*AssetFilter) Accept ¶
func (af *AssetFilter) Accept(name string) string
Accept provides a method which can be supplied to `FilterAssets` to handle `IncludeArtifacts` and `ExcludeArtifacts`.
type GitHubSource ¶
type GitHubSource struct { // Repo is the path to a repo in GitHub, using the "org/repo" format. Repo string `json:"repo"` }
GitHubSource represents a software package which is released via GitHub releases.
type Package ¶
type Package struct { // Name is a top-level directory name that the releases should be stored in. // This is collected from a map key in the configuration and is not directly // loaded from YAML. Name string `json:"-"` // If Alternatives is true, this will be considered an "alternatives" // collection, which contains single file alternatives for each Additional // item based on the latest minor (but not patch) versions of Primary. Alternatives bool // Primary is the primary source of release artifacts; collections of // release artifacts will be numbered based on the primary source's release // numbering scheme. Primary Source // Additional sources provide secondary artifacts which should be bundled // with the artifacts of the primary release. This can be useful (for // example) to select plugins which should be included with a base package. Additional []Source `json:",omitempty"` }
Package represents a single deployable set of software artifacts, possibly composed of several repo-level releases.
type Release ¶
type Release struct { Org string Repo string TagName string Created time.Time Assets assetList //[]Asset }
Release provides an interface for a release which contains multiple assets at the same release (TagName)
func LastN ¶
LastN selects the last N minor releases (including all patch releases) for a given sequence of releases, which need not be sorted.
type S3Source ¶ added in v0.21.0
type S3Source struct { // Bucket is the path to a Blob storage bucket Bucket string // Prefix is the path within a Blob storage bucket Prefix string }
S3Source represents a set of yaml documents published to a blob storage bucket.
type Source ¶
type Source struct { AssetFilter `json:",inline"` // GitHub represents software released on GitHub using GitHub releases. GitHub GitHubSource `json:"github,omitempty"` // S3 represents software manifests stored in an blob storage service under // a specified prefix. The blob paths should end with "vX.Y.Z/<asset name>" S3 S3Source `json:"s3,omitempty"` // EventingService represents the name of the service for the eventing source EventingService string `json:"eventingService,omitempty"` // IngressService represents the name of the network plugin for the ingress IngressService string `json:"ingressService,omitempty"` // Overrides provides a mechanism for modifying include/exclude (and // possibly other settings) on a per-release or per-minor-version basis, to // allow fixing up discontinuities in release patterns. Overrides map[string]AssetFilter `json:"overrides"` }
Source is represents the release artifacts of a given project or repo, which provides a sequence of semver-tagged artifact collections for an individual release.
func (*Source) Accept ¶
Accept determines the best acceptance function for the given version, taking into account overrides.