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 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 `json:"-"` }
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. TODO code does not belong in a types.go file.
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 { Meta // Team is the github account owner or BitBucket project key. Team string `json:"team"` // Project is the git repository basename. Project string `json:"project"` // Ref is the branch or tag to be built. Ref string `json:"ref"` // ID is an opaque build ID assigned when a build is scheduled. ID string `json:"id"` // DeferredUnixTime is the time at which a build is deferred, if at all. DeferredUnixtime int64 `json:"deferred-unixtime"` }
UserBuildEvent models an abstract build, independent of the source code management system that backs it.
func (UserBuildEvent) Lockname ¶
func (e UserBuildEvent) Lockname() string
Lockname returns the build locknae, which is the ProjectKey concatenated with "/" followed by the branch.
func (UserBuildEvent) ProjectKey ¶
func (e UserBuildEvent) ProjectKey() string
ProjectKey returns a key that identifies the codebase. For github projects, this is the github account owner concatenated with "/" followed by the basename of the repository.