Documentation
¶
Overview ¶
Package drone implements the Drone CI capability.
Index ¶
Constants ¶
View Source
const ( OpDeploy = "deploy" OpHealth = "health" )
Variables ¶
This section is empty.
Functions ¶
func CatalogSpec ¶
func CatalogSpec() capability.Spec
CatalogSpec returns capability metadata for documentation (handlers may close over a nil service and must not be invoked).
Types ¶
type Adapter ¶
type Adapter struct {
// contains filtered or unexported fields
}
Adapter implements Service using the Drone provider and the Gitea user as the namespace.
type Build ¶
type Build struct {
Number int `json:"number"`
Namespace string `json:"namespace"`
Repo string `json:"repo"`
URL string `json:"url,omitempty"`
}
Build is a Drone CI build created for the deploy repository.
type DeployInput ¶
DeployInput carries the user who should receive the deploy notification.
type Service ¶
type Service interface {
Deploy(ctx context.Context, in DeployInput) (*Build, error)
HealthCheck(ctx context.Context) (bool, error)
}
Service triggers the deploy repository build.
func New ¶
func New() Service
New creates an Adapter from provider config. Returns nil when the Drone endpoint is not configured.
func NewWithDeps ¶
func NewWithDeps(builds buildClient, namespace namespaceFunc, send notifyFunc, droneURL func() string) Service
NewWithDeps creates an Adapter from explicit dependencies. Returns nil when builds or namespace is nil.
Click to show internal directories.
Click to hide internal directories.