condition

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2015 License: Apache-2.0 Imports: 2 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Condition

type Condition struct {
	Owner       string // Indicates the step should run only for this repo (useful for forks)
	Branch      string // Indicates the step should run only for this branch
	Condition   string // Indicates the step should run if bash condition evals to true
	PullRequest *bool  `yaml:"pull_requests"` // Indicates the step should run for all pull requests
	AllBranches *bool  `yaml:"all_branches"`  // Indicates the step should run for all branches

	// Indicates the step should only run when the following
	// matrix values are present for the sub-build.
	Matrix map[string]string
}

func (*Condition) MatchBranch

func (c *Condition) MatchBranch(branch string) bool

MatchBranch is a helper function that returns true if all_branches is true. Else it returns false if a branch condition is specified, and the branch does not match.

func (*Condition) MatchOwner

func (c *Condition) MatchOwner(owner string) bool

MatchOwner is a helper function that returns false if an owner condition is specified and the repository owner does not match.

This is useful when you want to prevent forks from executing deployment, publish or notification steps.

func (*Condition) MatchPullRequest

func (c *Condition) MatchPullRequest(pr string) bool

MatchPullRequest is a helper function that returns false if Pull Requests are disbled, but the pull request string is not empty.

Jump to

Keyboard shortcuts

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