Documentation ¶
Index ¶
- Constants
- Variables
- func AssetPublisherCreators(assetPaths ...string) (map[string]Creator, error)
- func AssetRootCmd(creator Creator, short string) *cobra.Command
- func BasicConnectionInfoFlags() []distgo.PublisherFlag
- func GetRequiredGroupID(flagVals map[distgo.PublisherFlagName]interface{}, ...) (string, error)
- func MavenProductPath(productTaskOutputInfo distgo.ProductTaskOutputInfo, groupID string) string
- func PropertyNotSpecifiedError(flag distgo.PublisherFlag) error
- func Publishers() map[string]distgo.Publisher
- func SetConfigValue(flagVals map[distgo.PublisherFlagName]interface{}, flag distgo.PublisherFlag, ...) error
- func SetConfigValues(flagVals map[distgo.PublisherFlagName]interface{}, flagAndPtrs ...interface{}) error
- func SetPublishers(publishers map[string]Creator) error
- func SetRequiredStringConfigValue(flagVals map[distgo.PublisherFlagName]interface{}, flag distgo.PublisherFlag, ...) error
- func SetRequiredStringConfigValues(flagVals map[distgo.PublisherFlagName]interface{}, ...) error
- type ArtifactExistsFunc
- type ArtifactoryPublishConfig
- type ArtifactoryPublisher
- type BasicConnectionInfo
- func (b *BasicConnectionInfo) SetValuesFromFlags(flagVals map[distgo.PublisherFlagName]interface{}) error
- func (b *BasicConnectionInfo) UploadDistArtifacts(productTaskOutputInfo distgo.ProductTaskOutputInfo, baseURL string, ...) (artifactPaths []string, uploadedURLs []string, rErr error)
- func (b *BasicConnectionInfo) UploadFile(fileInfo FileInfo, baseURL, artifactName string, ...) (rURL string, rErr error)
- type BintrayPublishConfig
- type Checksums
- type Creator
- type FileInfo
- type GitHubPublishConfig
- type LocalPublishConfig
Constants ¶
View Source
const ArtifactoryPublishTypeName = "artifactory" // publishes output artifacts to Artifactory
View Source
const BintrayPublishTypeName = "bintray"
View Source
const GitHubPublishTypeName = "github"
View Source
const LocalPublishTypeName = "local" // publishes output artifacts to a location in the local filesystem
Variables ¶
View Source
var ( GroupIDFlag = distgo.PublisherFlag{ Name: "group-id", Description: "the Maven group for the product (overrides value specified in publish configuration)", Type: distgo.StringFlag, } ConnectionInfoURLFlag = distgo.PublisherFlag{ Name: "url", Description: "URL for publishing (such as https://repository.domain.com)", Type: distgo.StringFlag, } ConnectionInfoUsernameFlag = distgo.PublisherFlag{ Name: "username", Description: "username for authentication", Type: distgo.StringFlag, } ConnectionInfoPasswordFlag = distgo.PublisherFlag{ Name: "password", Description: "password for authentication", Type: distgo.StringFlag, } )
Functions ¶
func AssetPublisherCreators ¶
func BasicConnectionInfoFlags ¶
func BasicConnectionInfoFlags() []distgo.PublisherFlag
func GetRequiredGroupID ¶
func GetRequiredGroupID(flagVals map[distgo.PublisherFlagName]interface{}, productTaskOutputInfo distgo.ProductTaskOutputInfo) (string, error)
GetRequiredGroupID returns the value for the GroupID based on the provided inputs. If the provided flagVals map contains a non-empty string value for the GroupIDFlag, that value is used. Otherwise, if the PublishOutputInfo for the provided ProductTaskOutputInfo is non-nil, its GroupID value is returned. Returns an empty string if no GroupID value is specified.
func MavenProductPath ¶
func MavenProductPath(productTaskOutputInfo distgo.ProductTaskOutputInfo, groupID string) string
func PropertyNotSpecifiedError ¶
func PropertyNotSpecifiedError(flag distgo.PublisherFlag) error
func Publishers ¶
func SetConfigValue ¶
func SetConfigValue(flagVals map[distgo.PublisherFlagName]interface{}, flag distgo.PublisherFlag, configValPtr interface{}) error
func SetConfigValues ¶
func SetConfigValues(flagVals map[distgo.PublisherFlagName]interface{}, flagAndPtrs ...interface{}) error
func SetPublishers ¶
func SetRequiredStringConfigValue ¶
func SetRequiredStringConfigValue(flagVals map[distgo.PublisherFlagName]interface{}, flag distgo.PublisherFlag, stringPtr *string) error
func SetRequiredStringConfigValues ¶
func SetRequiredStringConfigValues(flagVals map[distgo.PublisherFlagName]interface{}, flagAndStringPtrs ...interface{}) error
Types ¶
type ArtifactExistsFunc ¶
type ArtifactExistsFunc func(dstFileName string, checksums Checksums, username, password string) bool
ArtifactExistsFunc returns true if the specified file with the specified checksums already exists in the destination.
type ArtifactoryPublishConfig ¶
type ArtifactoryPublishConfig struct { BasicConnectionInfo `yaml:"inline"` Repository string `yaml:"repository"` }
type ArtifactoryPublisher ¶
type ArtifactoryPublisher interface { distgo.Publisher ArtifactoryRunPublish(productTaskOutputInfo distgo.ProductTaskOutputInfo, cfgYML []byte, flagVals map[distgo.PublisherFlagName]interface{}, dryRun bool, stdout io.Writer) ([]string, error) }
func NewArtifactoryPublisher ¶
func NewArtifactoryPublisher() ArtifactoryPublisher
type BasicConnectionInfo ¶
type BasicConnectionInfo struct { URL string `yaml:"url"` Username string `yaml:"username"` Password string `yaml:"password"` }
func (*BasicConnectionInfo) SetValuesFromFlags ¶
func (b *BasicConnectionInfo) SetValuesFromFlags(flagVals map[distgo.PublisherFlagName]interface{}) error
func (*BasicConnectionInfo) UploadDistArtifacts ¶
func (b *BasicConnectionInfo) UploadDistArtifacts(productTaskOutputInfo distgo.ProductTaskOutputInfo, baseURL string, artifactExists ArtifactExistsFunc, dryRun bool, stdout io.Writer) (artifactPaths []string, uploadedURLs []string, rErr error)
func (*BasicConnectionInfo) UploadFile ¶
func (b *BasicConnectionInfo) UploadFile(fileInfo FileInfo, baseURL, artifactName string, artifactExists ArtifactExistsFunc, dryRun bool, stdout io.Writer) (rURL string, rErr error)
type BintrayPublishConfig ¶
type Creator ¶
func NewArtifactoryPublisherCreator ¶
func NewArtifactoryPublisherCreator() Creator
func NewBintrayPublisherCreator ¶
func NewBintrayPublisherCreator() Creator
func NewCreator ¶
func NewGitHubPublisherCreator ¶
func NewGitHubPublisherCreator() Creator
func NewLocalPublisherCreator ¶
func NewLocalPublisherCreator() Creator
type GitHubPublishConfig ¶
type LocalPublishConfig ¶
type LocalPublishConfig struct { // BaseDir is the base directory to which the artifacts are published. BaseDir string `yaml:"base-dir"` }
Click to show internal directories.
Click to hide internal directories.