Documentation ¶
Index ¶
- Constants
- Variables
- func BuildIsDone(bs string) bool
- func BuildIsFailure(bs string) bool
- func BuildIsQueued(bs string) bool
- func BuildIsSuccess(bs string) bool
- func GetReleaseVersionTag(m *cloudbuild.Build) string
- func GetRepoName(m *cloudbuild.Build) string
- func GetTargetCommitSh(m *cloudbuild.Build) string
- func GetValidTriggeredBranchName(m *cloudbuild.Build) (string, bool)
- func HandleCloudBuildEvent(ctx context.Context, registry *CloudBuildRegistry, build *cloudbuild.Build)
- func IsMissingSourceError(err string) bool
- func IsPublic(ctx context.Context, projectId, repoName string) bool
- func NewCloudBuildClient(ctx context.Context, projectId string) (*cloudbuild.Service, error)
- func NewPubSubClient(ctx context.Context, projectId string) (*pubsub.Client, error)
- func NewStorageClient(ctx context.Context, projectId string) (*storage.Client, error)
- type BuildStatus
- type CloudBot
- type CloudBuildEventHandler
- type CloudBuildRegistry
- type CloudSubscriber
- type SplitRepoName
- type Tags
- func (t Tags) AddBuilderTag(builder string) Tags
- func (t Tags) AddInstallationIdTag(instId int64) Tags
- func (t Tags) AddPRTag(pr int) Tags
- func (t Tags) AddRefTag(ref string) Tags
- func (t Tags) AddReleaseTag(tag string) Tags
- func (t Tags) AddRepoTag(repo string) Tags
- func (t Tags) AddShaTag(sha string) Tags
- func (t Tags) GetBuilderTag() string
- func (t Tags) GetInstallationId() int64
- func (t Tags) GetPR() int
- func (t Tags) GetRef() string
- func (t Tags) GetReleaseTag() string
- func (t Tags) GetRepo() string
- func (t Tags) GetSha() string
- func (t Tags) IsReleaseBuild() bool
Constants ¶
View Source
const ( BranchMaster = "master" CloudbuildFile = "cloudbuild.yaml" MissingSourceError = "unable to resolve source" )
View Source
const ( StatusUnknown BuildStatus = "STATUS_UNKNOWN" StatusQueued = "QUEUED" StatusWorking = "WORKING" StatusSuccess = "SUCCESS" StatusFailure = "FAILURE" StatusInternalError = "INTERNAL_ERROR" StatusTimeout = "TIMEOUT" StatusCancelled = "CANCELLED" )
View Source
const (
TOPIC = "cloud-builds"
)
Variables ¶
View Source
var (
DefaultRoot = "/etc/gce"
)
Functions ¶
func BuildIsDone ¶
func BuildIsFailure ¶
func BuildIsQueued ¶
func BuildIsSuccess ¶
func GetReleaseVersionTag ¶
func GetReleaseVersionTag(m *cloudbuild.Build) string
attempts to valid release tag returns empty string if none exists
func GetRepoName ¶
func GetRepoName(m *cloudbuild.Build) string
attempts to return repo name returns empty string if none exists
func GetTargetCommitSh ¶
func GetTargetCommitSh(m *cloudbuild.Build) string
func GetValidTriggeredBranchName ¶
Used by slack listener to see if the current branch is a valid branch to respond to
func HandleCloudBuildEvent ¶
func HandleCloudBuildEvent(ctx context.Context, registry *CloudBuildRegistry, build *cloudbuild.Build)
func IsMissingSourceError ¶
func NewCloudBuildClient ¶
func NewPubSubClient ¶
Types ¶
type BuildStatus ¶
type BuildStatus string
type CloudBot ¶
type CloudBot struct {
// contains filtered or unexported fields
}
func NewCloudBot ¶
type CloudBuildEventHandler ¶
type CloudBuildRegistry ¶
type CloudBuildRegistry struct {
// contains filtered or unexported fields
}
func (*CloudBuildRegistry) AddEventHandler ¶
func (r *CloudBuildRegistry) AddEventHandler(handler CloudBuildEventHandler)
type CloudSubscriber ¶
type CloudSubscriber struct {
// contains filtered or unexported fields
}
func NewCloudSubscriber ¶
func (*CloudSubscriber) GetProjectId ¶
func (cs *CloudSubscriber) GetProjectId() string
func (*CloudSubscriber) RegisterHandler ¶
func (cs *CloudSubscriber) RegisterHandler(handler CloudBuildEventHandler)
type SplitRepoName ¶
func GetRepoNameFromRepoSource ¶
func GetRepoNameFromRepoSource(rs *cloudbuild.RepoSource) *SplitRepoName
repo source name start as <source>_<owner>_<repo> github_solo-io_solobot transforms the above into the sum of it's parts
func GetSplitRepoName ¶
func GetSplitRepoName(m *cloudbuild.Build) *SplitRepoName
type Tags ¶
type Tags []string
func InitializeTags ¶
func (Tags) AddBuilderTag ¶ added in v0.10.10
func (Tags) AddInstallationIdTag ¶
func (Tags) AddReleaseTag ¶
func (Tags) AddRepoTag ¶
func (Tags) GetBuilderTag ¶ added in v0.10.10
func (Tags) GetInstallationId ¶
func (Tags) IsReleaseBuild ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.