cloudbuild

package
v0.18.0 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2026 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ResourceTypeTrigger    = "cloudbuild.trigger"
	ResourceTypeBuild      = "cloudbuild.build"
	ResourceTypeLocation   = "cloudbuild.location"
	ResourceTypeConnection = "cloudbuild.connection"
	ResourceTypeRepository = "cloudbuild.repository"
	ResourceTypeBranch     = "cloudbuild.branch"
	ResourceTypeTag        = "cloudbuild.tag"
)
View Source
const (
	EmittedEventType = "gcp.cloudbuild.build"
	SubscriptionType = "cloudbuild"
)

Variables

This section is empty.

Functions

func ListBranchResources

func ListBranchResources(ctx context.Context, client Client, repositoryName string) ([]core.IntegrationResource, error)

func ListBuildResources

func ListBuildResources(ctx context.Context, client Client, projectID string) ([]core.IntegrationResource, error)

func ListConnectionResources

func ListConnectionResources(ctx context.Context, client Client, projectID string, location string) ([]core.IntegrationResource, error)

func ListLocationResources

func ListLocationResources(ctx context.Context, client Client, projectID string) ([]core.IntegrationResource, error)

func ListRepositoryResources

func ListRepositoryResources(ctx context.Context, client Client, connectionName string) ([]core.IntegrationResource, error)

func ListTagResources

func ListTagResources(ctx context.Context, client Client, repositoryName string) ([]core.IntegrationResource, error)

func ListTriggerResources

func ListTriggerResources(ctx context.Context, client Client, projectID string) ([]core.IntegrationResource, error)

func SetClientFactory

func SetClientFactory(fn func(httpCtx core.HTTPContext, integration core.IntegrationContext) (Client, error))

Types

type Client

type Client interface {
	GetURL(ctx context.Context, fullURL string) ([]byte, error)
	PostURL(ctx context.Context, fullURL string, body any) ([]byte, error)
	ProjectID() string
}

Client is the interface used by Cloud Build components to call the API.

type CreateBuild

type CreateBuild struct{}

func (*CreateBuild) Cancel

func (c *CreateBuild) Cancel(ctx core.ExecutionContext) error

func (*CreateBuild) Cleanup

func (c *CreateBuild) Cleanup(_ core.SetupContext) error

func (*CreateBuild) Color

func (c *CreateBuild) Color() string

func (*CreateBuild) Configuration

func (c *CreateBuild) Configuration() []configuration.Field

func (*CreateBuild) Description

func (c *CreateBuild) Description() string

func (*CreateBuild) Documentation

func (c *CreateBuild) Documentation() string

func (*CreateBuild) ExampleOutput

func (c *CreateBuild) ExampleOutput() map[string]any

func (*CreateBuild) Execute

func (c *CreateBuild) Execute(ctx core.ExecutionContext) error

func (*CreateBuild) HandleHook added in v0.18.0

func (c *CreateBuild) HandleHook(ctx core.ActionHookContext) error

func (*CreateBuild) HandleWebhook

func (*CreateBuild) Hooks added in v0.18.0

func (c *CreateBuild) Hooks() []core.Hook

func (*CreateBuild) Icon

func (c *CreateBuild) Icon() string

func (*CreateBuild) Label

func (c *CreateBuild) Label() string

func (*CreateBuild) Name

func (c *CreateBuild) Name() string

func (*CreateBuild) OnIntegrationMessage

func (c *CreateBuild) OnIntegrationMessage(ctx core.IntegrationMessageContext) error

func (*CreateBuild) OutputChannels

func (c *CreateBuild) OutputChannels(_ any) []core.OutputChannel

func (*CreateBuild) ProcessQueueItem

func (c *CreateBuild) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)

func (*CreateBuild) Setup

func (c *CreateBuild) Setup(ctx core.SetupContext) error

type CreateBuildConfiguration

type CreateBuildConfiguration struct {
	ProjectID              string   `json:"projectId" mapstructure:"projectId"`
	Source                 string   `json:"source" mapstructure:"source"`
	UseConnectedRepository bool     `json:"useConnectedRepository" mapstructure:"useConnectedRepository"`
	ConnectionLocation     string   `json:"connectionLocation" mapstructure:"connectionLocation"`
	Connection             string   `json:"connection" mapstructure:"connection"`
	ConnectedRepository    string   `json:"connectedRepository" mapstructure:"connectedRepository"`
	ConnectedRevisionType  string   `json:"connectedRevisionType" mapstructure:"connectedRevisionType"`
	ConnectedBranch        string   `json:"connectedBranch" mapstructure:"connectedBranch"`
	ConnectedTag           string   `json:"connectedTag" mapstructure:"connectedTag"`
	ConnectedCommitSHA     string   `json:"connectedCommitSha" mapstructure:"connectedCommitSha"`
	RepoName               string   `json:"repoName" mapstructure:"repoName"`
	BranchName             string   `json:"branchName" mapstructure:"branchName"`
	TagName                string   `json:"tagName" mapstructure:"tagName"`
	CommitSHA              string   `json:"commitSha" mapstructure:"commitSha"`
	Steps                  string   `json:"steps" mapstructure:"steps"`
	Images                 []string `json:"images" mapstructure:"images"`
	Substitutions          string   `json:"substitutions" mapstructure:"substitutions"`
	Timeout                string   `json:"timeout" mapstructure:"timeout"`
}

type CreateBuildExecutionMetadata

type CreateBuildExecutionMetadata struct {
	Build map[string]any `json:"build,omitempty" mapstructure:"build,omitempty"`
}

type CreateBuildNodeMetadata

type CreateBuildNodeMetadata struct {
	SubscriptionID string `json:"subscriptionId,omitempty" mapstructure:"subscriptionId,omitempty"`
}

type GetBuild

type GetBuild struct{}

func (*GetBuild) Cancel

func (c *GetBuild) Cancel(_ core.ExecutionContext) error

func (*GetBuild) Cleanup

func (c *GetBuild) Cleanup(_ core.SetupContext) error

func (*GetBuild) Color

func (c *GetBuild) Color() string

func (*GetBuild) Configuration

func (c *GetBuild) Configuration() []configuration.Field

func (*GetBuild) Description

func (c *GetBuild) Description() string

func (*GetBuild) Documentation

func (c *GetBuild) Documentation() string

func (*GetBuild) ExampleOutput

func (c *GetBuild) ExampleOutput() map[string]any

func (*GetBuild) Execute

func (c *GetBuild) Execute(ctx core.ExecutionContext) error

func (*GetBuild) HandleHook added in v0.18.0

func (c *GetBuild) HandleHook(ctx core.ActionHookContext) error

func (*GetBuild) HandleWebhook

func (*GetBuild) Hooks added in v0.18.0

func (c *GetBuild) Hooks() []core.Hook

func (*GetBuild) Icon

func (c *GetBuild) Icon() string

func (*GetBuild) Label

func (c *GetBuild) Label() string

func (*GetBuild) Name

func (c *GetBuild) Name() string

func (*GetBuild) OutputChannels

func (c *GetBuild) OutputChannels(_ any) []core.OutputChannel

func (*GetBuild) ProcessQueueItem

func (c *GetBuild) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)

func (*GetBuild) Setup

func (c *GetBuild) Setup(ctx core.SetupContext) error

type GetBuildConfiguration

type GetBuildConfiguration struct {
	BuildID   string `json:"buildId" mapstructure:"buildId"`
	ProjectID string `json:"projectId" mapstructure:"projectId"`
}

type OnBuildComplete

type OnBuildComplete struct{}

func (*OnBuildComplete) Cleanup

func (t *OnBuildComplete) Cleanup(ctx core.TriggerContext) error

func (*OnBuildComplete) Color

func (t *OnBuildComplete) Color() string

func (*OnBuildComplete) Configuration

func (t *OnBuildComplete) Configuration() []configuration.Field

func (*OnBuildComplete) Description

func (t *OnBuildComplete) Description() string

func (*OnBuildComplete) Documentation

func (t *OnBuildComplete) Documentation() string

func (*OnBuildComplete) ExampleData

func (t *OnBuildComplete) ExampleData() map[string]any

func (*OnBuildComplete) HandleHook added in v0.18.0

func (t *OnBuildComplete) HandleHook(ctx core.TriggerHookContext) (map[string]any, error)

func (*OnBuildComplete) HandleWebhook

func (*OnBuildComplete) Hooks added in v0.18.0

func (t *OnBuildComplete) Hooks() []core.Hook

func (*OnBuildComplete) Icon

func (t *OnBuildComplete) Icon() string

func (*OnBuildComplete) Label

func (t *OnBuildComplete) Label() string

func (*OnBuildComplete) Name

func (t *OnBuildComplete) Name() string

func (*OnBuildComplete) OnIntegrationMessage

func (t *OnBuildComplete) OnIntegrationMessage(ctx core.IntegrationMessageContext) error

func (*OnBuildComplete) Setup

func (t *OnBuildComplete) Setup(ctx core.TriggerContext) error

type OnBuildCompleteConfiguration

type OnBuildCompleteConfiguration struct {
	Statuses    []string `json:"statuses" mapstructure:"statuses"`
	TriggerID   string   `json:"triggerId" mapstructure:"triggerId"`
	BuildSource string   `json:"buildSource" mapstructure:"buildSource"`
}

type OnBuildCompleteMetadata

type OnBuildCompleteMetadata struct {
	SubscriptionID string `json:"subscriptionId" mapstructure:"subscriptionId"`
}

type RunTrigger

type RunTrigger struct{}

func (*RunTrigger) Cancel

func (c *RunTrigger) Cancel(ctx core.ExecutionContext) error

func (*RunTrigger) Cleanup

func (c *RunTrigger) Cleanup(_ core.SetupContext) error

func (*RunTrigger) Color

func (c *RunTrigger) Color() string

func (*RunTrigger) Configuration

func (c *RunTrigger) Configuration() []configuration.Field

func (*RunTrigger) Description

func (c *RunTrigger) Description() string

func (*RunTrigger) Documentation

func (c *RunTrigger) Documentation() string

func (*RunTrigger) ExampleOutput

func (c *RunTrigger) ExampleOutput() map[string]any

func (*RunTrigger) Execute

func (c *RunTrigger) Execute(ctx core.ExecutionContext) error

func (*RunTrigger) HandleHook added in v0.18.0

func (c *RunTrigger) HandleHook(ctx core.ActionHookContext) error

func (*RunTrigger) HandleWebhook

func (*RunTrigger) Hooks added in v0.18.0

func (c *RunTrigger) Hooks() []core.Hook

func (*RunTrigger) Icon

func (c *RunTrigger) Icon() string

func (*RunTrigger) Label

func (c *RunTrigger) Label() string

func (*RunTrigger) Name

func (c *RunTrigger) Name() string

func (*RunTrigger) OnIntegrationMessage

func (c *RunTrigger) OnIntegrationMessage(ctx core.IntegrationMessageContext) error

func (*RunTrigger) OutputChannels

func (c *RunTrigger) OutputChannels(_ any) []core.OutputChannel

func (*RunTrigger) ProcessQueueItem

func (c *RunTrigger) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)

func (*RunTrigger) Setup

func (c *RunTrigger) Setup(ctx core.SetupContext) error

type RunTriggerConfiguration

type RunTriggerConfiguration struct {
	ProjectID string `json:"projectId" mapstructure:"projectId"`
	TriggerID string `json:"trigger" mapstructure:"trigger"`
	Ref       string `json:"ref" mapstructure:"ref"`
}

type RunTriggerNodeMetadata

type RunTriggerNodeMetadata struct {
	SubscriptionID string `json:"subscriptionId,omitempty" mapstructure:"subscriptionId,omitempty"`
	TriggerName    string `json:"triggerName,omitempty" mapstructure:"triggerName,omitempty"`
}

Jump to

Keyboard shortcuts

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