buildplan

package
v0.0.0-...-7426b64 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: BSD-3-Clause Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DependencyMapFor

func DependencyMapFor(a artifact.ArtifactID, artifacts artifact.Map, filter artifact.Map, keepUpdated bool) map[artifact.ArtifactID][]artifact.ArtifactID

DependencyMapFor returns for the given artifact ID a map of dependencies to a list of unique subdependencies. The returned map excludes any dependencies in the given filter, unless there is a version mismatch and `keepUpdated` is true (this signifies a dependency's version was updated).

func IsDependency

func IsDependency(a artifact.ArtifactID, changeset artifact.ArtifactChangeset, artifacts artifact.Map) bool

IsDependency iterates over all artifacts and their dependencies in the given changeset, and returns whether or not the given artifact is a dependency of any of those artifacts or dependencies.

func NewArtifactChangesetByBuildPlan

func NewArtifactChangesetByBuildPlan(oldBuildPlan *model.Build, build *model.Build, requestedOnly, buildtimeClosure bool, cfg platformModel.Configurable, auth *authentication.Auth) (artifact.ArtifactChangeset, error)

func NewBaseArtifactChangesetByBuildPlan

func NewBaseArtifactChangesetByBuildPlan(build *model.Build, requestedOnly, buildtimeClosure bool, cfg platformModel.Configurable, auth *authentication.Auth) (artifact.ArtifactChangeset, error)

func NewNamedMapFromBuildPlan

func NewNamedMapFromBuildPlan(build *model.Build, buildtimeClosure bool, cfg platformModel.Configurable, auth *authentication.Auth) (artifact.NamedMap, error)

NewMapFromBuildPlan creates an artifact map from a build plan where the key is the artifact name rather than the artifact ID.

func RecursiveDependenciesFor

func RecursiveDependenciesFor(a artifact.ArtifactID, artifacts artifact.Map) []artifact.ArtifactID

RecursiveDependenciesFor computes the recursive (direct and indirect) dependencies for an ArtifactID a using artifacts as a lookup table

func TopLevelArtifactsAdded

func TopLevelArtifactsAdded(changeset artifact.ArtifactChangeset, artifacts artifact.Map) []artifact.ArtifactID

Types

type ArtifactError

type ArtifactError struct {
	*locale.LocalizedError
	Artifact *model.Artifact
}

type ArtifactListing

type ArtifactListing struct {
	// contains filtered or unexported fields
}

func NewArtifactListing

func NewArtifactListing(build *model.Build, buildtimeClosure bool, cfg platformModel.Configurable, auth *authentication.Auth) (*ArtifactListing, error)

func (*ArtifactListing) ArtifactIDs

func (al *ArtifactListing) ArtifactIDs(buildtimeClosure bool) ([]artifact.ArtifactID, error)

func (*ArtifactListing) BuildtimeClosure

func (al *ArtifactListing) BuildtimeClosure() (artifact.Map, error)

func (*ArtifactListing) RuntimeClosure

func (al *ArtifactListing) RuntimeClosure() (artifact.Map, error)

type SourceInfo

type SourceInfo struct {
	Name      string
	Namespace string
	Version   string
}

SourceInfo contains useful information about the source that generated an artifact.

type TerminalArtifactMap

type TerminalArtifactMap map[string]artifact.Map

func NewMapFromBuildPlan

func NewMapFromBuildPlan(build *model.Build, calculateBuildtimeClosure bool, filterStateToolArtifacts bool, filterTerminal *model.NamedTarget, allowFailedArtifacts bool) (TerminalArtifactMap, error)

NewMapFromBuildPlan returns an artifact map keyed by the terminal (ie. platform). Setting calculateBuildtimeClosure as true calculates the artifact map with the buildtime dependencies. This is different from the runtime dependency calculation as it includes ALL of the input artifacts of the step that generated each artifact.

Jump to

Keyboard shortcuts

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