Documentation ¶
Index ¶
- Constants
- func DefaultMockBuilderContext(ctx context.Context) (*mockBuilderContext, error)
- func DescribeBuild(ctx context.Context, builderCtx BuildContext, id string) (*cloudbuild.Build, error)
- func NewMockBuilderContext(sharedContext *sharedContext, tag string, sha string) *mockBuilderContext
- func NewSharedContext(projectId string, installationId int64, client *github.Client, ...) *sharedContext
- func ToEnv(s subscription) string
- type BuildContext
- type BuildInfo
- type Builder
- type CommentBuildContext
- type CommitCommentContext
- func (ctx *CommitCommentContext) Body() string
- func (ctx CommitCommentContext) Builder() string
- func (ctx CommitCommentContext) Client() *github.Client
- func (ctx *CommitCommentContext) CommentEvent() *github.CommitCommentEvent
- func (ctx CommitCommentContext) InstallationId() int64
- func (ctx *CommitCommentContext) Owner() string
- func (ctx CommitCommentContext) ProjectId() string
- func (ctx *CommitCommentContext) Ref() string
- func (ctx *CommitCommentContext) Repo() string
- func (ctx CommitCommentContext) Service() *cloudbuild.Service
- func (ctx CommitCommentContext) SetBuilder(builder string)
- func (ctx *CommitCommentContext) Sha() string
- type IssueCommentContext
- func (ctx *IssueCommentContext) Author() string
- func (ctx *IssueCommentContext) Body() string
- func (ctx IssueCommentContext) Builder() string
- func (ctx IssueCommentContext) Client() *github.Client
- func (ctx *IssueCommentContext) CommentEvent() *github.IssueCommentEvent
- func (ctx IssueCommentContext) InstallationId() int64
- func (ctx *IssueCommentContext) Number() int
- func (ctx *IssueCommentContext) Owner() string
- func (ctx IssueCommentContext) ProjectId() string
- func (ctx *IssueCommentContext) PullRequest() *github.PullRequest
- func (ctx *IssueCommentContext) Ref() string
- func (ctx *IssueCommentContext) Repo() string
- func (ctx IssueCommentContext) Service() *cloudbuild.Service
- func (ctx IssueCommentContext) SetBuilder(builder string)
- func (ctx *IssueCommentContext) Sha() string
- type OperationBuildMetadata
- type PullRequestContext
- func (ctx PullRequestContext) Builder() string
- func (ctx PullRequestContext) Client() *github.Client
- func (ctx PullRequestContext) InstallationId() int64
- func (ctx *PullRequestContext) Owner() string
- func (ctx PullRequestContext) ProjectId() string
- func (ctx *PullRequestContext) PullRequest() *github.PullRequest
- func (ctx *PullRequestContext) Ref() string
- func (ctx *PullRequestContext) Repo() string
- func (ctx PullRequestContext) Service() *cloudbuild.Service
- func (ctx PullRequestContext) SetBuilder(builder string)
- func (ctx *PullRequestContext) Sha() string
- type RefBuildContext
- type ReleaseContext
- func (ctx ReleaseContext) Builder() string
- func (ctx ReleaseContext) Client() *github.Client
- func (ctx ReleaseContext) InstallationId() int64
- func (ctx *ReleaseContext) Owner() string
- func (ctx ReleaseContext) ProjectId() string
- func (ctx *ReleaseContext) Ref() string
- func (ctx *ReleaseContext) Release() *github.ReleaseEvent
- func (ctx *ReleaseContext) Repo() string
- func (ctx ReleaseContext) Service() *cloudbuild.Service
- func (ctx ReleaseContext) SetBuilder(builder string)
- func (ctx *ReleaseContext) Sha() string
- func (ctx *ReleaseContext) Tag() string
- type ShaBuildContext
- type StorageBuilder
- type TagBuildContext
Constants ¶
View Source
const ( PROJECT_ID subscription = "PROJECT_ID" BUILD_ID = "BUILD_ID" COMMIT_SHA = "COMMIT_SHA" SHORT_SHA = "SHORT_SHA" REPO_NAME = "REPO_NAME" BRANCH_NAME = "BRANCH_NAME" TAG_NAME = "TAG_NAME" REVISION_ID = "REVISION_ID" )
Variables ¶
This section is empty.
Functions ¶
func DescribeBuild ¶
func DescribeBuild(ctx context.Context, builderCtx BuildContext, id string) (*cloudbuild.Build, error)
func NewMockBuilderContext ¶
func NewSharedContext ¶
Types ¶
type BuildContext ¶
type BuildInfo ¶
type BuildInfo struct {
LogUrl string
}
func StartBuildWithSha ¶
func StartBuildWithSha(ctx context.Context, builderCtx ShaBuildContext) (*BuildInfo, error)
func StartBuildWithTag ¶
func StartBuildWithTag(ctx context.Context, builderCtx TagBuildContext) (*BuildInfo, error)
func StartPRBuild ¶ added in v0.10.6
func StartPRBuild(ctx context.Context, buildContext *PullRequestContext) (*BuildInfo, error)
type Builder ¶
type Builder interface { InitBuildWithSha(ctx context.Context, builderCtx ShaBuildContext) (*cloudbuild.Build, error) InitBuildWithTag(ctx context.Context, builderCtx TagBuildContext) (*cloudbuild.Build, error) }
type CommentBuildContext ¶
type CommentBuildContext interface { ShaBuildContext Body() string }
type CommitCommentContext ¶
type CommitCommentContext struct {
// contains filtered or unexported fields
}
func NewCommitCommentContext ¶
func NewCommitCommentContext(sharedContext *sharedContext, commit *github.CommitCommentEvent) *CommitCommentContext
func (*CommitCommentContext) Body ¶
func (ctx *CommitCommentContext) Body() string
func (CommitCommentContext) Builder ¶ added in v0.10.10
func (ctx CommitCommentContext) Builder() string
func (*CommitCommentContext) CommentEvent ¶
func (ctx *CommitCommentContext) CommentEvent() *github.CommitCommentEvent
func (CommitCommentContext) InstallationId ¶
func (ctx CommitCommentContext) InstallationId() int64
func (*CommitCommentContext) Owner ¶
func (ctx *CommitCommentContext) Owner() string
func (*CommitCommentContext) Ref ¶
func (ctx *CommitCommentContext) Ref() string
func (*CommitCommentContext) Repo ¶
func (ctx *CommitCommentContext) Repo() string
func (CommitCommentContext) SetBuilder ¶ added in v0.10.10
func (ctx CommitCommentContext) SetBuilder(builder string)
func (*CommitCommentContext) Sha ¶
func (ctx *CommitCommentContext) Sha() string
type IssueCommentContext ¶
type IssueCommentContext struct {
// contains filtered or unexported fields
}
func NewIssueCommentContext ¶
func NewIssueCommentContext(sharedContext *sharedContext, pullRequest *github.PullRequest, comment *github.IssueCommentEvent) *IssueCommentContext
func (*IssueCommentContext) Author ¶
func (ctx *IssueCommentContext) Author() string
func (*IssueCommentContext) Body ¶
func (ctx *IssueCommentContext) Body() string
func (IssueCommentContext) Builder ¶ added in v0.10.10
func (ctx IssueCommentContext) Builder() string
func (*IssueCommentContext) CommentEvent ¶
func (ctx *IssueCommentContext) CommentEvent() *github.IssueCommentEvent
func (IssueCommentContext) InstallationId ¶
func (ctx IssueCommentContext) InstallationId() int64
func (*IssueCommentContext) Number ¶
func (ctx *IssueCommentContext) Number() int
func (*IssueCommentContext) Owner ¶
func (ctx *IssueCommentContext) Owner() string
func (*IssueCommentContext) PullRequest ¶
func (ctx *IssueCommentContext) PullRequest() *github.PullRequest
func (*IssueCommentContext) Ref ¶
func (ctx *IssueCommentContext) Ref() string
func (*IssueCommentContext) Repo ¶
func (ctx *IssueCommentContext) Repo() string
func (IssueCommentContext) SetBuilder ¶ added in v0.10.10
func (ctx IssueCommentContext) SetBuilder(builder string)
func (*IssueCommentContext) Sha ¶
func (ctx *IssueCommentContext) Sha() string
type OperationBuildMetadata ¶
type OperationBuildMetadata struct { Type string `json:"@type"` Build *cloudbuild.Build `json:"build"` }
type PullRequestContext ¶
type PullRequestContext struct {
// contains filtered or unexported fields
}
func NewPullRequestContext ¶
func NewPullRequestContext(sharedContext *sharedContext, pr *github.PullRequest) *PullRequestContext
func (PullRequestContext) Builder ¶ added in v0.10.10
func (ctx PullRequestContext) Builder() string
func (PullRequestContext) InstallationId ¶
func (ctx PullRequestContext) InstallationId() int64
func (*PullRequestContext) Owner ¶
func (ctx *PullRequestContext) Owner() string
func (*PullRequestContext) PullRequest ¶
func (ctx *PullRequestContext) PullRequest() *github.PullRequest
func (*PullRequestContext) Ref ¶
func (ctx *PullRequestContext) Ref() string
func (*PullRequestContext) Repo ¶
func (ctx *PullRequestContext) Repo() string
func (PullRequestContext) SetBuilder ¶ added in v0.10.10
func (ctx PullRequestContext) SetBuilder(builder string)
func (*PullRequestContext) Sha ¶
func (ctx *PullRequestContext) Sha() string
type RefBuildContext ¶
type RefBuildContext interface { BuildContext Ref() string }
type ReleaseContext ¶
type ReleaseContext struct {
// contains filtered or unexported fields
}
func NewReleaseContext ¶
func NewReleaseContext(ctx context.Context, sharedContext *sharedContext, release *github.ReleaseEvent) (*ReleaseContext, error)
func (ReleaseContext) InstallationId ¶
func (ctx ReleaseContext) InstallationId() int64
func (*ReleaseContext) Owner ¶
func (ctx *ReleaseContext) Owner() string
func (*ReleaseContext) Ref ¶
func (ctx *ReleaseContext) Ref() string
func (*ReleaseContext) Release ¶
func (ctx *ReleaseContext) Release() *github.ReleaseEvent
func (*ReleaseContext) Repo ¶
func (ctx *ReleaseContext) Repo() string
func (ReleaseContext) SetBuilder ¶ added in v0.10.10
func (ctx ReleaseContext) SetBuilder(builder string)
func (*ReleaseContext) Sha ¶
func (ctx *ReleaseContext) Sha() string
func (*ReleaseContext) Tag ¶
func (ctx *ReleaseContext) Tag() string
type ShaBuildContext ¶
type ShaBuildContext interface { BuildContext Sha() string }
type StorageBuilder ¶
type StorageBuilder struct {
// contains filtered or unexported fields
}
func NewStorageBuilder ¶
func NewStorageBuilder(ctx context.Context, projectId string) (*StorageBuilder, error)
func (*StorageBuilder) InitBuildWithSha ¶
func (sb *StorageBuilder) InitBuildWithSha(ctx context.Context, builderCtx ShaBuildContext) (*cloudbuild.Build, error)
func (*StorageBuilder) InitBuildWithTag ¶
func (sb *StorageBuilder) InitBuildWithTag(ctx context.Context, builderCtx TagBuildContext) (*cloudbuild.Build, error)
type TagBuildContext ¶
type TagBuildContext interface { ShaBuildContext Tag() string }
Click to show internal directories.
Click to hide internal directories.