api

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2014 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const BuildConfigLabel = "buildconfig"

BuildConfigLabel is the key of a Build label whose value is the ID of a BuildConfig on which the Build is based.

Variables

This section is empty.

Functions

This section is empty.

Types

type Build

type Build struct {
	api.TypeMeta `json:",inline" yaml:",inline"`
	Labels       map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"`

	// Parameters are all the inputs used to create the build pod.
	Parameters BuildParameters `json:"parameters,omitempty" yaml:"parameters,omitempty"`

	// Status is the current status of the build.
	Status BuildStatus `json:"status,omitempty" yaml:"status,omitempty"`

	// PodID is the id of the pod that is used to execute the build
	PodID string `json:"podID,omitempty" yaml:"podID,omitempty"`
}

Build encapsulates the inputs needed to produce a new deployable image, as well as the status of the execution and a reference to the Pod which executed the build.

func (*Build) IsAnAPIObject

func (*Build) IsAnAPIObject()

type BuildConfig

type BuildConfig struct {
	api.TypeMeta `json:",inline" yaml:",inline"`
	Labels       map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"`

	// Secret used to validate requests.
	Secret string `json:"secret,omitempty" yaml:"secret,omitempty"`

	// Parameters holds all the input necessary to produce a new build.
	Parameters BuildParameters `json:"parameters,omitempty" yaml:"parameters,omitempty"`
}

BuildConfig is a template which can be used to create new builds.

func (*BuildConfig) IsAnAPIObject

func (*BuildConfig) IsAnAPIObject()

type BuildConfigList

type BuildConfigList struct {
	api.TypeMeta `json:",inline" yaml:",inline"`
	Items        []BuildConfig `json:"items,omitempty" yaml:"items,omitempty"`
}

BuildConfigList is a collection of BuildConfigs.

func (*BuildConfigList) IsAnAPIObject

func (*BuildConfigList) IsAnAPIObject()

type BuildList

type BuildList struct {
	api.TypeMeta `json:",inline" yaml:",inline"`
	Items        []Build `json:"items,omitempty" yaml:"items,omitempty"`
}

BuildList is a collection of Builds.

func (*BuildList) IsAnAPIObject

func (*BuildList) IsAnAPIObject()

type BuildOutput

type BuildOutput struct {
	// ImageTag is the tag to give to the image resulting from the build.
	ImageTag string `json:"imageTag,omitempty" yaml:"imageTag,omitempty"`

	// Registry is the Docker registry which should receive the resulting built image via push.
	Registry string `json:"registry,omitempty" yaml:"registry,omitempty"`
}

BuildOutput is input to a build strategy and describes the Docker image that the strategy should produce.

type BuildParameters

type BuildParameters struct {
	// Source describes the SCM in use.
	Source BuildSource `json:"source,omitempty" yaml:"source,omitempty"`

	// Revision is the information from the source for a specific repo snapshot.
	// This is optional.
	Revision *SourceRevision `json:"revision,omitempty" yaml:"revision,omitempty"`

	// Strategy defines how to perform a build.
	Strategy BuildStrategy `json:"strategy,omitempty" yaml:"strategy,omitempty"`

	// Output describes the Docker image the Strategy should produce.
	Output BuildOutput `json:"output,omitempty" yaml:"output,omitempty"`
}

BuildParameters encapsulates all the inputs necessary to represent a build.

type BuildSource

type BuildSource struct {
	Type BuildSourceType `json:"type,omitempty" yaml:"type,omitempty"`
	Git  *GitBuildSource `json:"git,omitempty" yaml:"git,omitempty"`
}

BuildSource is the SCM used for the build

type BuildSourceType

type BuildSourceType string

BuildSourceType is the type of SCM used

const (
	//BuildGitSource is a Git SCM
	BuildSourceGit BuildSourceType = "Git"
)

Valid values for BuildSourceType.

type BuildStatus

type BuildStatus string

BuildStatus represents the status of a build at a point in time.

const (
	// BuildNew is automatically assigned to a newly created build.
	BuildStatusNew BuildStatus = "New"

	// BuildPending indicates that a pod name has been assigned and a build is
	// about to start running.
	BuildStatusPending BuildStatus = "Pending"

	// BuildRunning indicates that a pod has been created and a build is running.
	BuildStatusRunning BuildStatus = "Running"

	// BuildComplete indicates that a build has been successful.
	BuildStatusComplete BuildStatus = "Complete"

	// BuildFailed indicates that a build has executed and failed.
	BuildStatusFailed BuildStatus = "Failed"

	// BuildError indicates that an error prevented the build from executing.
	BuildStatusError BuildStatus = "Error"
)

Valid values for BuildStatus.

type BuildStrategy

type BuildStrategy struct {
	// Type is the kind of build strategy.
	Type BuildStrategyType `json:"type,omitempty" yaml:"type,omitempty"`

	// DockerStrategy holds the parameters to the Docker build strategy.
	DockerStrategy *DockerBuildStrategy `json:"dockerBuildStrategy,omitempty" yaml:"dockerBuildStrategy,omitempty"`

	// STIStrategy holds the parameters to the STI build strategy.
	STIStrategy *STIBuildStrategy `json:"stiBuildStrategy,omitempty" yaml:"stiBuildStrategy,omitempty"`
}

BuildStrategy contains the details of how to perform a build.

type BuildStrategyType

type BuildStrategyType string

BuildStrategyType describes a particular way of performing a build.

const (
	// DockerBuildStrategyType performs builds using a Dockerfile.
	DockerBuildStrategyType BuildStrategyType = "Docker"

	// STIBuildStrategyType performs builds build using Source To Images with a Git repository
	// and a builder image.
	STIBuildStrategyType BuildStrategyType = "STI"
)

Valid values for BuildStrategyType.

type DockerBuildStrategy

type DockerBuildStrategy struct {
	// ContextDir is used as the Docker build context. It is a path for a directory within the
	// application source directory structure (as referenced in the BuildSource. See GitBuildSource
	// for an example.)
	ContextDir string `json:"contextDir,omitempty" yaml:"contextDir,omitempty"`
}

DockerBuildStrategy defines input parameters specific to Docker build.

type GitBuildSource

type GitBuildSource struct {
	// URI points to the source that will be built. The structure of the source
	// will depend on the type of build to run
	URI string `json:"uri,omitempty" yaml:"uri,omitempty"`

	// Ref is the branch/tag/ref to build.
	Ref string `json:"ref,omitempty" yaml:"ref,omitempty"`
}

GitBuildSource defines the parameters of a Git SCM

type GitSourceRevision

type GitSourceRevision struct {
	// Commit is the commit hash identifying a specific commit
	Commit string `json:"commit,omitempty" yaml:"commit,omitempty"`

	// Author is the author of a specific commit
	Author SourceControlUser `json:"author,omitempty" yaml:"author,omitempty"`

	// Committer is the commiter of a specific commit
	Committer SourceControlUser `json:"committer,omitempty" yaml:"committer,omitempty"`

	// Message is the description of a specific commit
	Message string `json:"message,omitempty" yaml:"message,omitempty"`
}

GitSourceRevision is the commit information from a git source for a build

type STIBuildStrategy

type STIBuildStrategy struct {
	// BuilderImage is the image used to execute the build.
	BuilderImage string `json:"builderImage,omitempty" yaml:"builderImage,omitempty"`
}

STIBuildStrategy defines input parameters specific to an STI build.

type SourceControlUser

type SourceControlUser struct {
	Name  string `json:"name,omitempty" yaml:"name,omitempty"`
	Email string `json:"email,omitempty" yaml:"email,omitempty"`
}

SourceControlUser defines the identity of a user of source control

type SourceRevision

type SourceRevision struct {
	Type BuildSourceType    `json:"type,omitempty" yaml:"type,omitempty"`
	Git  *GitSourceRevision `json:"git,omitempty" yaml:"git,omitempty"`
}

SourceRevision is the revision or commit information from the source for the build

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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