artifact

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: 9 Imported by: 0

Documentation

Index

Constants

View Source
const InstallerTestsSubstr = "-tests."

InstallerTestsSubstr is used to exclude test artifacts, we don't care about them

Variables

View Source
var CamelRuntimeBuilding error = errs.New("camel runtime is currently being built")

Functions

func ArtifactIDsToMap

func ArtifactIDsToMap(ids []ArtifactID) map[ArtifactID]struct{}

Types

type Artifact

type Artifact struct {
	ArtifactID       ArtifactID
	Name             string
	Namespace        string
	Version          *string
	RequestedByOrder bool
	URL              string
	MimeType         string

	GeneratedBy strfmt.UUID

	Dependencies []ArtifactID
}

Artifact comprises useful information about an artifact that we extracted from a build plan

func (Artifact) NameWithVersion

func (a Artifact) NameWithVersion() string

NameWithVersion returns a string <name>@<version> if artifact has a version specified, otherwise it returns just the name

type ArtifactChangeset

type ArtifactChangeset struct {
	Added   []Artifact
	Removed []Artifact
	Updated []ArtifactUpdate
}

func NewArtifactChangeset

func NewArtifactChangeset(old, new NamedMap, requestedOnly bool) ArtifactChangeset

NewArtifactChangeset parses two recipes and returns the artifact IDs of artifacts that have changed due to changes in the order requirements

type ArtifactDownload

type ArtifactDownload struct {
	ArtifactID     ArtifactID
	DownloadURI    string
	UnsignedLogURI string
	Checksum       string
}

func NewDownloadsFromBuild

func NewDownloadsFromBuild(buildStatus *headchef_models.V1BuildStatusResponse) (download []ArtifactDownload, err error)

NewDownloadsFromBuild extracts downloadable artifact information from the build status response

func NewDownloadsFromBuildPlan

func NewDownloadsFromBuildPlan(build bpModel.Build, artifacts map[strfmt.UUID]Artifact) ([]ArtifactDownload, error)

func NewDownloadsFromCamelBuild

func NewDownloadsFromCamelBuild(buildStatus *headchef_models.V1BuildStatusResponse) ([]ArtifactDownload, error)

func NewDownloadsFromCamelBuildPlan

func NewDownloadsFromCamelBuildPlan(build bpModel.Build, artifacts map[strfmt.UUID]Artifact) ([]ArtifactDownload, error)

type ArtifactID

type ArtifactID = strfmt.UUID

ArtifactID represents an artifact ID

func ArtifactIDsFromArtifactSlice

func ArtifactIDsFromArtifactSlice(from []Artifact) []ArtifactID

func ArtifactIDsFromBuildPlanMap

func ArtifactIDsFromBuildPlanMap(from Map) []ArtifactID

type ArtifactUpdate

type ArtifactUpdate struct {
	From Artifact
	To   Artifact

	// IngredientChange tells us whether or not this change extends to the ingredient
	// This can easily be calculated based on From.version!=To.version, but that's not easy to always remember.
	// Storing it as a property helps surface the behavior and avoid the assumption that an artifact change equals an ingredient change.
	IngredientChange bool
}

type FailedArtifact

type FailedArtifact struct {
	ArtifactID     ArtifactID
	UnsignedLogURI string
	ErrorMsg       string
}

FailedArtifact collects information we want to have on failed artifacts

func NewFailedArtifactsFromBuild

func NewFailedArtifactsFromBuild(buildStatus *headchef_models.V1BuildStatusResponse) []FailedArtifact

NewFailedArtifactsFromBuild extracts artifact information about failed artifacts from the build status response

func NewFailedArtifactsFromBuildPlan

func NewFailedArtifactsFromBuildPlan(build model.Build) []FailedArtifact

type Map

type Map map[ArtifactID]Artifact

Map maps artifact ids to artifact information extracted from a build plan

type Named

type Named map[ArtifactID]string

func ResolveArtifactNames

func ResolveArtifactNames(resolver func(ArtifactID) string, artifacts []ArtifactID) Named

type NamedMap

type NamedMap map[string]Artifact

NamedMap maps artifact names to artifact information extracted from a build plan

Jump to

Keyboard shortcuts

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