Documentation ¶
Index ¶
- type ArtifactSetup
- type ErrMetaData
- type ErrNoPrefixes
- type ErrNotExecutable
- type MetaData
- type MetaDataBinary
- type Resolver
- type Setup
- func (s *Setup) DeleteOutdatedArtifacts(_ artifact.ArtifactChangeset, _, alreadyInstalled store.StoredArtifactMap) error
- func (s *Setup) DownloadsFromBuild(build model.Build, artifacts map[strfmt.UUID]artifact.Artifact) ([]artifact.ArtifactDownload, error)
- func (s *Setup) ResolveArtifactName(_ artifact.ArtifactID) string
- type TargetedRelocation
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ArtifactSetup ¶
type ArtifactSetup struct {
// contains filtered or unexported fields
}
func NewArtifactSetup ¶
func NewArtifactSetup(artifactID artifact.ArtifactID, store *store.Store) *ArtifactSetup
func (*ArtifactSetup) EnvDef ¶
func (as *ArtifactSetup) EnvDef(tmpDir string) (*envdef.EnvironmentDefinition, error)
func (*ArtifactSetup) Unarchiver ¶
func (as *ArtifactSetup) Unarchiver() unarchiver.Unarchiver
type ErrMetaData ¶
type ErrMetaData struct{ *errs.WrapperError }
type ErrNoPrefixes ¶
type ErrNoPrefixes struct{ *locale.LocalizedError }
type ErrNotExecutable ¶
type ErrNotExecutable struct{ *locale.LocalizedError }
type MetaData ¶
type MetaData struct { // InstallDir is the root directory of the artifact files that we need to copy on the user's machine InstallDir string // AffectedEnv is an environment variable that we should ensure is not set, as it might conflict with the artifact AffectedEnv string `json:"affected_env"` // Env is a key value map containing all the env vars, values can contain the RelocationDir value (which will be replaced) Env map[string]string `json:"env"` // PathListEnv is a key value map containing all env vars, where the value is a list of paths that we have to prepend to the existing environment PathListEnv map[string]string `json:"path_list_env"` // BinaryLocations are locations that we should add to the PATH BinaryLocations []MetaDataBinary `json:"binaries_in"` // RelocationDir is the string that we should replace with the actual install dir of the artifact RelocationDir string `json:"relocation_dir"` // LibLocation is the place in which .so and .dll files are stored (which binary files will need relocated) RelocationTargetBinaries string `json:"relocation_target_binaries"` // TargetedRelocations are relocations that only target specific parts of the installation TargetedRelocations []TargetedRelocation `json:"custom_relocations"` }
MetaData is used to parse the metadata.json file
func InitMetaData ¶
InitMetaData will create an instance of MetaData based on the metadata.json file found under the given artifact install dir
func ParseMetaData ¶
ParseMetaData will parse the given bytes into the MetaData struct
type MetaDataBinary ¶
type MetaDataBinary struct { Path string `json:"path"` Relative bool // RelativeInt is used to unmarshal the 'relative' boolean, which is given as a 0 or a 1, which Go's // json package doesn't recognize as bools. // Don't use this field, use Relative instead. RelativeInt int `json:"relative"` }
MetaDataBinary is used to represent a binary path contained within the metadata.json file
type Resolver ¶
type Resolver struct{}
func NewResolver ¶
func NewResolver() *Resolver
func (*Resolver) ResolveArtifactName ¶
func (r *Resolver) ResolveArtifactName(_ artifact.ArtifactID) string
type Setup ¶
type Setup struct {
// contains filtered or unexported fields
}
func (*Setup) DeleteOutdatedArtifacts ¶
func (s *Setup) DeleteOutdatedArtifacts(_ artifact.ArtifactChangeset, _, alreadyInstalled store.StoredArtifactMap) error
DeleteOutdatedArtifacts deletes the entire installation directory, unless alreadyInstalled is not zero, which can happen when the executors directory needs to be re-generated.
func (*Setup) DownloadsFromBuild ¶
func (*Setup) ResolveArtifactName ¶
func (s *Setup) ResolveArtifactName(_ artifact.ArtifactID) string
type TargetedRelocation ¶
type TargetedRelocation struct { // InDir is the directory in which files need to be relocated InDir string `json:"dir"` // SearchString to be replaced SearchString string `json:"search"` // Replacement is the replacement string Replacement string `json:"replace"` }
TargetedRelocation is a relocation instruction for files in a specific directory
Click to show internal directories.
Click to hide internal directories.