Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Build ¶
type Build struct { ID string `json:"id"` ProjectKey string `json:"projectKey"` Branch string `json:"branch"` Result int `json:"result"` Duration uint64 `json:"duration"` UnixTime uint64 `json:"startTime"` }
Build models the historical build information available to Decap in the backing storage system.
type Deferred ¶
type Deferred struct { Meta DeferredEvents []UserBuildEvent `json:"deferred"` }
Deferred models a deferred build. Builds are deferred when they cannot get a lock on their backing branch. Decap uses locks to prevent concurrent builds of the same branch.
type Meta ¶
type Meta struct {
Error string `json:"error,omitempty"`
}
Meta models fields common to most publicly exposed types.
type Project ¶
type Project struct { Team string `json:"team"` ProjectName string `json:"project"` Descriptor ProjectDescriptor `json:"descriptor,omitempty"` Sidecars []string `json:"sidecars,omitempty"` }
Project models a specific project. Sidecars are literal Kubernetes container specs articulated in JSON. A user can include any amount of detail in the side car spec, which will be deserialized into a native Kubernetes container type for inclusion in the materialized build pod.
type ProjectDescriptor ¶
type ProjectDescriptor struct { // Image is the container image the associated project should be built in. Image string `json:"buildImage"` // RepoManager is the source code management system the project source is contained in. RepoManager string `json:"repoManager"` // RepoURL is largely informational for the human managing this project. It is currently unused by Decap. RepoURL string `json:"repoUrl"` // RepoDescription is a human readable description of this project. RepoDescription string `json:"repoDescription"` // ManagedRegexStr is a regular expression that defines which refs (branches and tags) is willing to build as a result of // a post-commit hook. Manual builds are not subject to this regex. ManagedRefRegexStr string `json:"managedRefRegex"` // The formal regex associated with ManagedRefRegexStr above. Regex *regexp.Regexp }
ProjectDescriptor models required information about a project.
func (ProjectDescriptor) IsRefManaged ¶
func (d ProjectDescriptor) IsRefManaged(ref string) bool
IsRefManaged is used by Decap to determine if a build should be launched as a result of a post-commit hook on a given ref.
type ShutdownState ¶
ShutdownState models whether the build queue is open or closed.
type Team ¶
type Team struct {
Name string `json:"name"`
}
Team models the name of a group of developers or a project.
type UserBuildEvent ¶
type UserBuildEvent struct { Team_ string `json:"team"` Project_ string `json:"project"` Refs_ []string `json:"refs"` Deferral locks.Deferral `json:"deferral"` }
UserBuildEvent models an abstract build, independent of the source code management system that backs it.
func (UserBuildEvent) Hash ¶
func (e UserBuildEvent) Hash() string
func (UserBuildEvent) Key ¶
func (e UserBuildEvent) Key() string
func (UserBuildEvent) Project ¶
func (e UserBuildEvent) Project() string
func (UserBuildEvent) Refs ¶
func (e UserBuildEvent) Refs() []string
func (UserBuildEvent) Team ¶
func (e UserBuildEvent) Team() string