Documentation ¶
Index ¶
Constants ¶
const (
DefaultDockerNetworkMode = "bridge"
)
Variables ¶
This section is empty.
Functions ¶
func DockerHostname ¶
DockerHostname returns empty string when Docker.NetworkMode is empty. DockerNetworkMode returns Docker.NetworkMode when it is not empty.
func DockerNetworkMode ¶
DockerNetworkMode returns DefaultNetworkMode when Docker.NetworkMode is empty. DockerNetworkMode returns Docker.NetworkMode when it is not empty.
Types ¶
type Build ¶
type Build struct { // Image specifies the Docker Image that will be // used to virtualize the Build process. Image string // Name specifies a user-defined label used // to identify the build. Name string // Script specifies the build and test commands. Script []string // Env specifies the environment of the build. Env []string // Hosts specifies the custom IP address and // hostname mappings. Hosts []string // Cache lists a set of directories that should // persisted between builds. Cache []string // Services specifies external services, such as // database or messaging queues, that should be // linked to the build environment. Services []string // White-list of Branches that are built. Branches []string Deploy *deploy.Deploy `yaml:"deploy,omitempty"` Publish *publish.Publish `yaml:"publish,omitempty"` Notifications *notify.Notification `yaml:"notify,omitempty"` // Git specified git-specific parameters, such as // the clone depth and path Git *git.Git `yaml:"git,omitempty"` // Docker container parameters, such as // NetworkMode and UserName Docker *Docker `yaml:"docker,omitempty"` }
Build stores the configuration details for building, testing and deploying code.
func ParseBuild ¶
func ParseBuildFile ¶
func (*Build) MatchBranch ¶
func (*Build) Write ¶
Write adds all the steps to the build script, including build commands, deploy and publish commands.
func (*Build) WriteBuild ¶
WriteBuild adds only the build steps to the build script, omitting publish and deploy steps. This is important for pull requests, where deployment would be undesirable.
type Deployment ¶
type Docker ¶
type Docker struct { // NetworkMode (also known as `--net` option) // Could be set only if Docker is running in privileged mode NetworkMode *string `yaml:"net,omitempty"` // Hostname (also known as `--hostname` option) // Could be set only if Docker is running in privileged mode Hostname *string `yaml:"hostname,omitempty"` // Allocate a pseudo-TTY (also known as `--tty` option) TTY bool `yaml:"tty,omitempty"` }
Docker stores the configuration details for configuring docker container.
type Notification ¶
type Notification interface {
Set(c Context)
}