Documentation ¶
Overview ¶
Built-in preconditions for use in deployment strategies.
Index ¶
- type GithubCombinedStatusPrecondition
- type GithubFetchCommitSHA1Precondition
- type GithubRequireAheadContext
- type GithubRequireAheadPrecondition
- func (gh *GithubRequireAheadPrecondition) Merge(deployment common.Deployment, ctx *GithubRequireAheadContext) (string, error)
- func (gh *GithubRequireAheadPrecondition) NeedsMerge(deployment common.Deployment, ctx *GithubRequireAheadContext) (bool, error)
- func (gh *GithubRequireAheadPrecondition) Status(deployment common.Deployment) error
- type RestrictForcePrecondition
- type SleepPrecondition
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GithubCombinedStatusPrecondition ¶
type GithubCombinedStatusPrecondition struct { // If true then it will ignore the reported status if GitHub reports that // there are no status checks. AllowEmpty bool }
func (*GithubCombinedStatusPrecondition) Status ¶
func (gh *GithubCombinedStatusPrecondition) Status(deployment common.Deployment) error
type GithubFetchCommitSHA1Precondition ¶
type GithubFetchCommitSHA1Precondition struct{}
Fetches the SHA1 for the commit from GitHub.
func (*GithubFetchCommitSHA1Precondition) Status ¶
func (gh *GithubFetchCommitSHA1Precondition) Status(deployment common.Deployment) error
type GithubRequireAheadContext ¶
type GithubRequireAheadContext struct { RepoClient *common.GithubRepository RepoDetails *github.Repository }
type GithubRequireAheadPrecondition ¶
type GithubRequireAheadPrecondition struct {
AutoMerge bool
}
Require that the branch for deployment not be behind the default branch on GitHub. If `AutoMerge` is true then it will try to create a merge via the GitHub API if the deployed ref is behind.
func (*GithubRequireAheadPrecondition) Merge ¶
func (gh *GithubRequireAheadPrecondition) Merge(deployment common.Deployment, ctx *GithubRequireAheadContext) (string, error)
Creates merge commit to get the target branch (deployment's ref) up-to-date with the default branch of the repository.
func (*GithubRequireAheadPrecondition) NeedsMerge ¶
func (gh *GithubRequireAheadPrecondition) NeedsMerge(deployment common.Deployment, ctx *GithubRequireAheadContext) (bool, error)
Compares the ref being deployed against the default branch on GitHub to determine whether or not a merge needs to happen. Returns `false` if it's a force deployment.
func (*GithubRequireAheadPrecondition) Status ¶
func (gh *GithubRequireAheadPrecondition) Status(deployment common.Deployment) error
type RestrictForcePrecondition ¶
type RestrictForcePrecondition struct { // Array of environments for which force deploys are allowed. Safelist []string }
func (*RestrictForcePrecondition) Status ¶
func (rfp *RestrictForcePrecondition) Status(deployment common.Deployment) error
type SleepPrecondition ¶
func (*SleepPrecondition) Status ¶
func (s *SleepPrecondition) Status(deployment common.Deployment) error
Click to show internal directories.
Click to hide internal directories.