Documentation
¶
Index ¶
- type GitBranch
- func (gb *GitBranch) Changelog() string
- func (gb *GitBranch) Condition(source string, scm scm.ScmHandler) (pass bool, message string, err error)
- func (gb *GitBranch) Source(workingDir string, resultSource *result.Source) error
- func (gb *GitBranch) Target(source string, scm scm.ScmHandler, dryRun bool, resultTarget *result.Target) (err error)
- type Spec
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GitBranch ¶
type GitBranch struct {
// contains filtered or unexported fields
}
GitBranch defines a resource of kind "gitbranch"
func New ¶
New returns a reference to a newly initialized GitBranch object from a Spec or an error if the provided Filespec triggers a validation error.
func (*GitBranch) Changelog ¶
Changelog returns the changelog for this resource, or an empty string if not supported
func (*GitBranch) Condition ¶
func (gb *GitBranch) Condition(source string, scm scm.ScmHandler) (pass bool, message string, err error)
Condition checks that a git branch exists
type Spec ¶
type Spec struct {
// path contains the git repository path
Path string `yaml:",omitempty"`
// VersionFilter provides parameters to specify version pattern and its type like regex, semver, or just latest.
//
// compatible:
// * source
// * condition
// * target
VersionFilter version.Filter `yaml:",omitempty"`
// branch specifies the branch name
//
// compatible:
// * source
// * condition
// * target
Branch string `yaml:",omitempty"`
// "url" specifies the git url to use for fetching Git Tags.
//
// compatible:
// * source
// * condition
// * target
//
// example:
// * git@github.com:updatecli/updatecli.git
// * https://github.com/updatecli/updatecli.git
//
// remarks:
// when using the ssh protocol, the user must have the right to clone the repository
// based on its local ssh configuration
SourceBranch string `yaml:",omitempty"`
// "sourcebranch" defines the branch name used as a source to create the new Git branch.
//
// compatible:
// * target
//
// remark:
// * sourcebranch is required when the scmid is not defined.
URL string `yaml:",omitempty" jsonschema:"required"`
// "username" specifies the username when using the HTTP protocol
//
// compatible
// * source
// * condition
// * target
Username string `yaml:",omitempty"`
// "password" specifies the password when using the HTTP protocol
//
// compatible:
// * source
// * condition
// * target
Password string `yaml:",omitempty"`
// "key" of the tag object to retrieve.
//
// Accepted values: ['name','hash'].
//
// Default: 'name'
// Compatible:
// * source
Key string `yaml:",omitempty"`
}
Spec defines a specification for a "gitbranch" resource parsed from an updatecli manifest file
Click to show internal directories.
Click to hide internal directories.