preconditions

package
v0.0.0-...-1316712 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2016 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Built-in preconditions for use in deployment strategies.

Index

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

type GithubFetchCommitSHA1Precondition

type GithubFetchCommitSHA1Precondition struct{}

Fetches the SHA1 for the commit from GitHub.

func (*GithubFetchCommitSHA1Precondition) Status

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

Creates merge commit to get the target branch (deployment's ref) up-to-date with the default branch of the repository.

func (*GithubRequireAheadPrecondition) NeedsMerge

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

type SleepPrecondition struct {
	Duration time.Duration
}

func (*SleepPrecondition) Status

func (s *SleepPrecondition) Status(deployment common.Deployment) error

Jump to

Keyboard shortcuts

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