 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    Index ¶
- type Bitbucket
- func (b *Bitbucket) Add(files []string) error
- func (b *Bitbucket) Checkout() error
- func (b *Bitbucket) Clean() error
- func (b *Bitbucket) Clone() (string, error)
- func (b *Bitbucket) Commit(message string) error
- func (b *Bitbucket) GetBranches() (sourceBranch, workingBranch, targetBranch string)
- func (b *Bitbucket) GetChangedFiles(workingDir string) ([]string, error)
- func (b *Bitbucket) GetDirectory() (directory string)
- func (b *Bitbucket) GetPassword() string
- func (b *Bitbucket) GetURL() string
- func (b *Bitbucket) GetUsername() string
- func (b *Bitbucket) IsRemoteBranchUpToDate() (bool, error)
- func (b *Bitbucket) Push() (bool, error)
- func (b *Bitbucket) PushBranch(branch string) error
- func (b *Bitbucket) PushTag(tag string) error
- func (b *Bitbucket) SearchTags() (tags []string, err error)
 
- type Spec
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bitbucket ¶
type Bitbucket struct {
	// Spec contains inputs coming from updatecli configuration
	Spec Spec
	// contains filtered or unexported fields
}
    Bitbucket contains information to interact with Bitbucket Cloud API
func (*Bitbucket) GetBranches ¶
func (*Bitbucket) GetChangedFiles ¶
func (*Bitbucket) GetDirectory ¶
GetDirectory returns the local git repository path.
func (*Bitbucket) GetPassword ¶
func (*Bitbucket) GetUsername ¶
func (*Bitbucket) IsRemoteBranchUpToDate ¶
IsRemoteBranchUpToDate checks if the branch reference name is published on on the default remote
func (*Bitbucket) Push ¶
Push run `git push` to the corresponding Bitbucket Server remote branch if not already created.
func (*Bitbucket) PushBranch ¶
PushBranch push branch
func (*Bitbucket) SearchTags ¶
Retrieve git tags from a remote Bitbucket Server repository
type Spec ¶
type Spec struct {
	client.Spec `yaml:",inline,omitempty"`
	//  "commitMessage" is used to generate the final commit message.
	//
	//  compatible:
	//    * scm
	//
	//  remark:
	//    it's worth mentioning that the commit message settings is applied to all targets linked to the same scm.
	CommitMessage commit.Commit `yaml:",omitempty"`
	//  "directory" defines the local path where the git repository is cloned.
	//
	//  compatible:
	//    * scm
	//
	//  remark:
	//    Unless you know what you are doing, it is recommended to use the default value.
	//    The reason is that Updatecli may automatically clean up the directory after a pipeline execution.
	//
	//  default:
	//    The default value is based on your local temporary directory like: (on Linux)
	//    /tmp/updatecli/bitbucket/<owner>/<repository>
	Directory string `yaml:",omitempty"`
	//  "email" defines the email used to commit changes.
	//
	//  compatible:
	//    * scm
	//
	//  default:
	//    default set to your global git configuration
	Email string `yaml:",omitempty"`
	//  "force" is used during the git push phase to run `git push --force`.
	//
	//  compatible:
	//    * scm
	//
	//  default:
	//    false
	//
	//  remark:
	//    When force is set to true, Updatecli also recreate the working branches that
	//    diverged from their base branch.
	Force *bool `yaml:",omitempty"`
	//	"gpg" specifies the GPG key and passphrased used for commit signing
	//
	//	compatible:
	//		* scm
	GPG sign.GPGSpec `yaml:",omitempty"`
	//	"owner" defines the owner of a repository.
	//
	//	compatible:
	//		* scm
	Owner string `yaml:",omitempty" jsonschema:"required"`
	//	repository specifies the name of a repository for a specific owner.
	//
	//	compatible:
	//		* scm
	Repository string `yaml:",omitempty" jsonschema:"required"`
	//	"user" specifies the user associated with new git commit messages created by Updatecli
	//
	//	compatible:
	//		* scm
	User string `yaml:",omitempty"`
	//  "branch" defines the git branch to work on.
	//
	//  compatible:
	//    * scm
	//
	//  default:
	//    main
	//
	//  remark:
	//    depending on which resource references the Bitbucket Cloud scm, the behavior will be different.
	//
	//    If the scm is linked to a source or a condition (using scmid), the branch will be used to retrieve
	//    file(s) from that branch.
	//
	//    If the scm is linked to target then Updatecli creates a new "working branch" based on the branch value.
	//    The working branch created by Updatecli looks like "updatecli_<pipelineID>".
	//    The working branch can be disabled using the "workingBranch" parameter set to false.
	Branch string `yaml:",omitempty"`
	//  "submodules" defines if Updatecli should checkout submodules.
	//
	//  compatible:
	//	  * scm
	//
	//  default: true
	Submodules *bool `yaml:",omitempty"`
	//  "workingBranch" defines if Updatecli should use a temporary branch to work on.
	//  If set to `true`, Updatecli create a temporary branch to work on, based on the branch value.
	//
	//  compatible:
	//	  * scm
	//
	//  default: true
	WorkingBranch *bool `yaml:",omitempty"`
}
    Spec defines settings used to interact with Bitbucket Cloud release
 Click to show internal directories. 
   Click to hide internal directories.