build

package
v2.56.8 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2024 License: Apache-2.0 Imports: 24 Imported by: 4

Documentation

Index

Constants

View Source
const (
	HttpProxyEnvKey  = "HTTP_PROXY"
	HttpsProxyEnvKey = "HTTPS_PROXY"
	NoProxyEnvKey    = "NO_PROXY"
)
View Source
const (
	BuildInfoDetails          = "details"
	BuildTempPath             = "jfrog/builds/"
	ProjectConfigBuildNameKey = "name"
)
View Source
const ArtifactPattern = "artifactPattern"
View Source
const BuildName = "build.name"

For key/value binding

View Source
const BuildNumber = "build.number"
View Source
const BuildProject = "build.project"
View Source
const BuildTimestamp = "build.timestamp"
View Source
const DeployArtifacts = "artifacts"
View Source
const DeployableArtifacts = "deployable.artifacts.map"
View Source
const DeployerPrefix = "deployer."
View Source
const ExcludePatterns = "excludePatterns"
View Source
const FilterExcludedArtifactsFromBuild = "filterExcludedArtifactsFromBuild"
View Source
const ForkCount = "forkCount"
View Source
const GeneratedBuildInfo = "buildInfo.generated"
View Source
const Host = "host"
View Source
const IncludePatterns = "includePatterns"
View Source
const InsecureTls = "insecureTls"
View Source
const IvyDescriptor = "deployIvyDescriptors"
View Source
const IvyPattern = "ivyPattern"
View Source
const MavenDescriptor = "deployMavenDescriptors"
View Source
const NoProxy = "noProxy"
View Source
const Password = "password"
View Source
const Port = "port"
View Source
const PropertiesTempPath = "jfrog/properties/"

For path and temp files

View Source
const ReleaseRepo = "releaseRepo"
View Source
const Repo = "repo"
View Source
const ResolverPrefix = "resolver."
View Source
const ServerId = "serverId"
View Source
const SnapshotRepo = "snapshotRepo"
View Source
const Url = "url"
View Source
const Username = "username"

Variables

This section is empty.

Functions

func CreateBuildInfoProps

func CreateBuildInfoProps(buildArtifactsDetailsFile string, config *viper.Viper, projectType project.ProjectType) (map[string]string, error)

func CreateBuildInfoService

func CreateBuildInfoService() *build.BuildInfoService

func CreateBuildProperties

func CreateBuildProperties(buildName, buildNumber, projectKey string) (string, error)

func CreateBuildPropsFromConfiguration

func CreateBuildPropsFromConfiguration(buildConfiguration *BuildConfiguration) (string, error)

func GetBuildDir

func GetBuildDir(buildName, buildNumber, projectKey string) (string, error)

func GetGeneratedBuildsInfo

func GetGeneratedBuildsInfo(buildName, buildNumber, projectKey string) ([]*buildInfo.BuildInfo, error)

func GetServerDetails

func GetServerDetails(vConfig *viper.Viper) (*config.ServerDetails, error)

Returns the Artifactory details Checks first for the deployer information if exists and if not, checks for the resolver information.

func PopulateBuildArtifactsAsPartials

func PopulateBuildArtifactsAsPartials(buildArtifacts []buildInfo.Artifact, buildConfiguration *BuildConfiguration, moduleType buildInfo.ModuleType) error

func PrepareBuildPrerequisites

func PrepareBuildPrerequisites(buildConfiguration *BuildConfiguration) (build *build.Build, err error)

func ReadBuildInfoGeneralDetails

func ReadBuildInfoGeneralDetails(buildName, buildNumber, projectKey string) (*buildInfo.General, error)

func ReadMavenConfig

func ReadMavenConfig(path string, mvnProps map[string]any) (config *viper.Viper, err error)

func ReadPartialBuildInfoFiles

func ReadPartialBuildInfoFiles(buildName, buildNumber, projectKey string) (buildInfo.Partials, error)

func RemoveBuildDir

func RemoveBuildDir(buildName, buildNumber, projectKey string) error

func SaveBuildGeneralDetails

func SaveBuildGeneralDetails(buildName, buildNumber, projectKey string) error

func SaveBuildInfo

func SaveBuildInfo(buildName, buildNumber, projectKey string, buildInfo *buildInfo.BuildInfo) (err error)

func SavePartialBuildInfo

func SavePartialBuildInfo(buildName, buildNumber, projectKey string, populatePartialBuildInfoFunc populatePartialBuildInfo) error

Types

type BuildConfigMapping

type BuildConfigMapping map[project.ProjectType][]*map[string]string

type BuildConfiguration

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

func ExtractBuildDetailsFromArgs

func ExtractBuildDetailsFromArgs(args []string) (cleanArgs []string, buildConfig *BuildConfiguration, err error)

func NewBuildConfiguration

func NewBuildConfiguration(buildName, buildNumber, module, project string) *BuildConfiguration

func (*BuildConfiguration) GetBuildName

func (bc *BuildConfiguration) GetBuildName() (string, error)

func (*BuildConfiguration) GetBuildNumber

func (bc *BuildConfiguration) GetBuildNumber() (string, error)

func (*BuildConfiguration) GetModule

func (bc *BuildConfiguration) GetModule() string

func (*BuildConfiguration) GetProject

func (bc *BuildConfiguration) GetProject() string

func (*BuildConfiguration) IsCollectBuildInfo

func (bc *BuildConfiguration) IsCollectBuildInfo() (bool, error)

func (*BuildConfiguration) IsLoadedFromConfigFile

func (bc *BuildConfiguration) IsLoadedFromConfigFile() bool

func (*BuildConfiguration) SetBuildName

func (bc *BuildConfiguration) SetBuildName(buildName string) *BuildConfiguration

func (*BuildConfiguration) SetBuildNumber

func (bc *BuildConfiguration) SetBuildNumber(buildNumber string) *BuildConfiguration

func (*BuildConfiguration) SetModule

func (bc *BuildConfiguration) SetModule(module string) *BuildConfiguration

func (*BuildConfiguration) SetProject

func (bc *BuildConfiguration) SetProject(project string) *BuildConfiguration

func (*BuildConfiguration) ValidateBuildAndModuleParams

func (bc *BuildConfiguration) ValidateBuildAndModuleParams() error

Validates: 1. If the build number exists, the build name also exists (and vice versa). 2. If the modules exist, the build name/number are also exist (and vice versa).

func (*BuildConfiguration) ValidateBuildParams

func (bc *BuildConfiguration) ValidateBuildParams() error

Validates that if the build number exists, the build name also exists (and vice versa).

Jump to

Keyboard shortcuts

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