buildinfo

package
v0.14.5 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const BuildInfoEnvPrefix = "buildInfo.env."

Variables

This section is empty.

Functions

This section is empty.

Types

type AffectedIssue

type AffectedIssue struct {
	Key        string `json:"key,omitempty"`
	Url        string `json:"url,omitempty"`
	Summary    string `json:"summary,omitempty"`
	Aggregated bool   `json:"aggregated,omitempty"`
}

type Agent

type Agent struct {
	Name    string `json:"name,omitempty"`
	Version string `json:"version,omitempty"`
}

type Artifact

type Artifact struct {
	Name string `json:"name,omitempty"`
	Type string `json:"type,omitempty"`
	Path string `json:"path,omitempty"`
	*Checksum
}

type BuildInfo

type BuildInfo struct {
	Name                     string   `json:"name,omitempty"`
	Number                   string   `json:"number,omitempty"`
	Agent                    *Agent   `json:"agent,omitempty"`
	BuildAgent               *Agent   `json:"buildAgent,omitempty"`
	Modules                  []Module `json:"modules,omitempty"`
	Started                  string   `json:"started,omitempty"`
	Properties               Env      `json:"properties,omitempty"`
	ArtifactoryPrincipal     string   `json:"artifactoryPrincipal,omitempty"`
	BuildUrl                 string   `json:"url,omitempty"`
	Issues                   *Issues  `json:"issues,omitempty"`
	ArtifactoryPluginVersion string   `json:"artifactoryPluginVersion,omitempty"`
	*Vcs
}

func New

func New() *BuildInfo

func (*BuildInfo) Append

func (targetBuildInfo *BuildInfo) Append(buildInfo *BuildInfo)

Append the modules of the received build info to this build info. If the two build info instances contain modules with identical names, these modules are merged. When merging the modules, the artifacts and dependencies remain unique according to their checksum.

func (*BuildInfo) SetAgentName

func (targetBuildInfo *BuildInfo) SetAgentName(agentName string)

func (*BuildInfo) SetAgentVersion

func (targetBuildInfo *BuildInfo) SetAgentVersion(agentVersion string)

func (*BuildInfo) SetArtifactoryPluginVersion

func (targetBuildInfo *BuildInfo) SetArtifactoryPluginVersion(artifactoryPluginVersion string)

func (*BuildInfo) SetBuildAgentVersion

func (targetBuildInfo *BuildInfo) SetBuildAgentVersion(buildAgentVersion string)

type Checksum

type Checksum struct {
	Sha1 string `json:"sha1,omitempty"`
	Md5  string `json:"md5,omitempty"`
}

type Configuration

type Configuration struct {
	ArtDetails auth.ServiceDetails
	BuildUrl   string
	DryRun     bool
	EnvInclude string
	EnvExclude string
}

func (Configuration) ExcludeFilter

func (config Configuration) ExcludeFilter() Filter

ExcludeFilter returns a function used to filter entries of a map based on key

func (*Configuration) GetArtifactoryDetails

func (config *Configuration) GetArtifactoryDetails() auth.ServiceDetails

func (Configuration) IncludeFilter

func (config Configuration) IncludeFilter() Filter

IncludeFilter returns a function used to filter entries of a map based on key

func (*Configuration) IsDryRun

func (config *Configuration) IsDryRun() bool

func (*Configuration) SetArtifactoryDetails

func (config *Configuration) SetArtifactoryDetails(artDetails auth.ServiceDetails)

type Dependency

type Dependency struct {
	Id     string   `json:"id,omitempty"`
	Type   string   `json:"type,omitempty"`
	Scopes []string `json:"scopes,omitempty"`
	*Checksum
}

type Env

type Env map[string]string

type Filter

type Filter func(map[string]string) (map[string]string, error)

type General

type General struct {
	Timestamp time.Time `json:"Timestamp,omitempty"`
}

type Issues

type Issues struct {
	Tracker                *Tracker        `json:"tracker,omitempty"`
	AggregateBuildIssues   bool            `json:"aggregateBuildIssues,omitempty"`
	AggregationBuildStatus string          `json:"aggregationBuildStatus,omitempty"`
	AffectedIssues         []AffectedIssue `json:"affectedIssues,omitempty"`
}

type Module

type Module struct {
	Properties   interface{}  `json:"properties,omitempty"`
	Id           string       `json:"id,omitempty"`
	Artifacts    []Artifact   `json:"artifacts,omitempty"`
	Dependencies []Dependency `json:"dependencies,omitempty"`
}

type Partial

type Partial struct {
	Artifacts    []Artifact   `json:"Artifacts,omitempty"`
	Dependencies []Dependency `json:"Dependencies,omitempty"`
	Env          Env          `json:"Env,omitempty"`
	Timestamp    int64        `json:"Timestamp,omitempty"`
	ModuleId     string       `json:"ModuleId,omitempty"`
	Issues       *Issues      `json:"Issues,omitempty"`
	*Vcs
}

type Partials

type Partials []*Partial

func (Partials) Len

func (partials Partials) Len() int

func (Partials) Less

func (partials Partials) Less(i, j int) bool

func (Partials) Swap

func (partials Partials) Swap(i, j int)

type Tracker

type Tracker struct {
	Name    string `json:"name,omitempty"`
	Version string `json:"version,omitempty"`
}

type Vcs

type Vcs struct {
	Url      string `json:"vcsUrl,omitempty"`
	Revision string `json:"vcsRevision,omitempty"`
}

Jump to

Keyboard shortcuts

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