plugin

package
v0.0.0-...-c9b8ea3 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2023 License: Apache-2.0 Imports: 11 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 New

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

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

func UseDefaultTag

func UseDefaultTag(ref, defaultBranch string) bool

UseDefaultTag for keep only default branch for latest tag

Types

type Build

type Build struct {
	Name       string          // Git commit sha used as docker default named tag
	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
	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  cli.StringSlice // Docker build cache-from
	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
}

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
}

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 (*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
	Cleanup bool
}

Settings for the Plugin.

Jump to

Keyboard shortcuts

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