plugin

package
v0.0.0-...-d0cc957 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultTagSuffix

func DefaultTagSuffix(ref, suffix string) ([]string, error)

DefaultTagSuffix returns a set of default suggested tags based on the commit ref with an attached suffix.

func DefaultTags

func DefaultTags(ref string) ([]string, error)

DefaultTags returns a set of default suggested tags based on the commit ref.

func UseDefaultTag

func UseDefaultTag(ref, defaultBranch string) bool

UseDefaultTag to keep only default branch for latest tag.

Types

type Build

type Build struct {
	Ref          string          // Git commit ref
	Branch       string          // Git repository branch
	Dockerfile   string          // Docker build Dockerfile
	Context      string          // Docker build context
	TagsAuto     bool            // Docker build auto tag
	TagsSuffix   string          // Docker build tags with suffix
	Tags         cli.StringSlice // Docker build tags
	ExtraTags    cli.StringSlice // Docker build tags including registry
	Platforms    cli.StringSlice // Docker build target platforms
	Args         cli.StringSlice // Docker build args
	ArgsEnv      cli.StringSlice // Docker build args from env
	Target       string          // Docker build target
	Pull         bool            // Docker build pull
	CacheFrom    []string        // Docker build cache-from
	CacheTo      string          // Docker build cache-to
	Compress     bool            // Docker build compress
	Repo         string          // Docker build repository
	NoCache      bool            // Docker build no-cache
	AddHost      cli.StringSlice // Docker build add-host
	Quiet        bool            // Docker build quiet
	Output       string          // Docker build output folder
	NamedContext cli.StringSlice // Docker build named context
	Labels       cli.StringSlice // Docker build labels
	Provenance   string          // Docker build provenance attestation
	SBOM         string          // Docker build sbom attestation
	Secrets      []string        // Docker build secrets
}

Build defines Docker build parameters.

type Daemon

type Daemon struct {
	Registry       string          // Docker registry
	Mirror         string          // Docker registry mirror
	Insecure       bool            // Docker daemon enable insecure registries
	StorageDriver  string          // Docker daemon storage driver
	StoragePath    string          // Docker daemon storage path
	Disabled       bool            // DOcker daemon is disabled (already running)
	Debug          bool            // Docker daemon started in debug mode
	Bip            string          // Docker daemon network bridge IP address
	DNS            cli.StringSlice // Docker daemon dns server
	DNSSearch      cli.StringSlice // Docker daemon dns search domain
	MTU            string          // Docker daemon mtu setting
	IPv6           bool            // Docker daemon IPv6 networking
	Experimental   bool            // Docker daemon enable experimental mode
	BuildkitConfig string          // Docker buildkit config
}

Daemon defines Docker daemon parameters.

type Login

type Login struct {
	Registry string // Docker registry address
	Username string // Docker registry username
	Password string // Docker registry password
	Email    string // Docker registry email
	Config   string // Docker Auth Config
}

Login defines Docker login parameters.

type Plugin

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

Plugin implements drone.Plugin to provide the plugin implementation.

func New

func New(settings Settings, pipeline drone.Pipeline, network drone.Network) *Plugin

New initializes a plugin from the given Settings, Pipeline, and Network.

func (*Plugin) Execute

func (p *Plugin) Execute() error

Execute provides the implementation of the plugin.

func (*Plugin) Validate

func (p *Plugin) Validate() error

Validate handles the settings validation of the plugin.

type Settings

type Settings struct {
	Daemon Daemon
	Login  Login
	Build  Build
	Dryrun bool
}

Settings for the Plugin.

Jump to

Keyboard shortcuts

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