plugin

package
v0.4.7 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2023 License: Apache-2.0 Imports: 16 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(options ...func(*Plugin)) config.Plugin

New creates a drone plugin

func WithAllowListFile added in v0.3.10

func WithAllowListFile(file string) func(*Plugin)

WithAllowListFile configures with repo slug regex match list file

func WithAlwaysRunAll added in v0.4.5

func WithAlwaysRunAll(alwaysRunAll bool) func(*Plugin)

WithAlwaysRunAll configures always run all enabled or disabled

func WithBitBucketAuthServer added in v0.3.3

func WithBitBucketAuthServer(bitBucketAuthServer string) func(*Plugin)

WithBitBucketAuthServer configures an auth server

func WithBitBucketClient

func WithBitBucketClient(bitBucketClient string) func(*Plugin)

WithBitBucketClient configures with a bitbucket client, alternative to github

func WithBitBucketSecret

func WithBitBucketSecret(bitBucketSecret string) func(*Plugin)

WithBitBucketClient configures with a bitbucket secret, alternative to github

func WithCacheTTL added in v0.4.2

func WithCacheTTL(ttl time.Duration) func(*Plugin)

WithCacheTTL enables request/response caching and the specified TTL for each entry

func WithConcat

func WithConcat(concat bool) func(*Plugin)

WithConcat configures with concat enabled or disabled

func WithConsiderFile added in v0.3.11

func WithConsiderFile(considerFile string) func(*Plugin)

WithConsiderFile configures with a consider file which contains references to all 'drone.yml' files which should be considered for the repository.

func WithFallback

func WithFallback(fallback bool) func(*Plugin)

WithFallback configures with fallback enabled or disabled

func WithFinalizeSupport added in v0.4.6

func WithFinalizeSupport(finalize bool) func(*Plugin)

WithFinalizeSupport adds dependencies to all pipelines to a user provider pipelined named `finalize`

func WithGithubToken

func WithGithubToken(gitHubToken string) func(*Plugin)

WithGithubToken configures with the github token specified

func WithGitlabServer added in v0.3.5

func WithGitlabServer(gitLabServer string) func(*Plugin)

WithGitlabServer configures with the gitlab server specified

func WithGitlabToken added in v0.3.5

func WithGitlabToken(gitLabToken string) func(*Plugin)

WithGitlabToken configures with the gitlab token specified

func WithMaxDepth

func WithMaxDepth(maxDepth int) func(*Plugin)

WithMaxDepth configures with max depth to search for 'drone.yml'. Requires fallback to be enabled.

func WithServer

func WithServer(server string) func(*Plugin)

WithServer configures with a custom SCM server

Types

type ConsiderData added in v0.3.11

type ConsiderData struct {
	// contains filtered or unexported fields
}

ConsiderData holds the considerFile information in both list and map representations

type DroneConfigCombiner added in v0.4.6

type DroneConfigCombiner struct {
	LoadedConfigs []*LoadedDroneConfig
}

DroneConfigCombiner holds multiple LoadedDroneConfigs to combine them

func (*DroneConfigCombiner) Append added in v0.4.6

func (dcc *DroneConfigCombiner) Append(ldc *LoadedDroneConfig)

Append adds a new LoadedDroneConfig

func (*DroneConfigCombiner) Combine added in v0.4.6

func (dcc *DroneConfigCombiner) Combine(mondifyFinalizeConfig bool) string

Combine concats all appended configs in to a single string

func (*DroneConfigCombiner) ConfigNames added in v0.4.6

func (dcc *DroneConfigCombiner) ConfigNames(without KeyOnlyMap) []string

ConfigNames loads the names of all Pipelines as map keys

func (*DroneConfigCombiner) Merge added in v0.4.6

func (dcc *DroneConfigCombiner) Merge(left *DroneConfigCombiner)

Merge merges `left` into current DroneConfigCombiner

type KeyOnlyMap added in v0.4.6

type KeyOnlyMap map[string]interface{}

KeyOnlyMap is a map with only keys

type LoadedDroneConfig added in v0.4.6

type LoadedDroneConfig struct {
	Name    string
	Content string
}

LoadedDroneConfig holds the name and the string content of a `.drone.yml` file

type Plugin

type Plugin struct {
	// contains filtered or unexported fields
}

Plugin defines the plugin settings

func (*Plugin) Find

func (p *Plugin) Find(ctx context.Context, droneRequest *config.Request) (*drone.Config, error)

Find is called by drone

func (*Plugin) NewScmClient

func (p *Plugin) NewScmClient(ctx context.Context, uuid uuid.UUID, repo drone.Repo) (scmClient scm_clients.ScmClient, err error)

NewScmClient creates a new client for the git provider

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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