Documentation
¶
Overview ¶
Package drone implements output to .drone.yml.
Index ¶
- func HasDroneOutput() dag.NodeCondition
- type Compiler
- type CustomCompiler
- type Output
- func (o *Output) Compile(compiler Compiler) error
- func (o *Output) Filenames() []string
- func (o *Output) GenerateFile(filename string, w io.Writer) error
- func (o *Output) Pipeline(name string, targets []string, crons []string) *Pipeline
- func (o *Output) Service(spec *yaml.Container)
- func (o *Output) Step(step *Step)
- func (o *Output) VolumeHostPath(name, hostPath, mountPath string) *Output
- func (o *Output) VolumeHostPathStandalone(name, hostPath string) *Output
- func (o *Output) VolumeTemporary(name, mountPath string) *Output
- type Pipeline
- type Step
- func (step *Step) DependsOn(depends ...string) *Step
- func (step *Step) DockerLogin() *Step
- func (step *Step) EmptyDirVolume(name, mountPath string) *Step
- func (step *Step) Environment(name, value string) *Step
- func (step *Step) EnvironmentFromSecret(name, secretName string) *Step
- func (step *Step) ExceptPullRequest() *Step
- func (step *Step) Image(image string) *Step
- func (step *Step) LocalRegistry() *Step
- func (step *Step) Name(name string) *Step
- func (step *Step) OnlyOnBranch(branchName string) *Step
- func (step *Step) OnlyOnPullRequest() *Step
- func (step *Step) OnlyOnTag() *Step
- func (step *Step) Privileged() *Step
- func (step *Step) PublishArtifacts(note string, artifacts ...string) *Step
- func (step *Step) ResourceRequests(cpuCores, memoryGib int) *Step
- type StepService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HasDroneOutput ¶
func HasDroneOutput() dag.NodeCondition
HasDroneOutput checks if the node implements Compiler and has any output from drone.
Types ¶
type CustomCompiler ¶
type CustomCompiler interface {
DroneEnabled() bool
}
CustomCompiler is implemented by custom steps.
type Output ¶
type Output struct { output.FileAdapter PipelineType string NotifySlackChannel string BuildContainer string // contains filtered or unexported fields }
Output implements Drone project config generation.
func (*Output) Compile ¶
Compile implements output.TypedWriter interface.
func (*Output) GenerateFile ¶
GenerateFile implements output.FileWriter interface.
func (*Output) Pipeline ¶
Pipeline creates a new pipeline which can be triggered via promotion/cron.
func (*Output) VolumeHostPath ¶
VolumeHostPath adds a host path mount.
func (*Output) VolumeHostPathStandalone ¶
VolumeHostPathStandalone adds a host path mount, but doesn't make it default mount.
func (*Output) VolumeTemporary ¶
VolumeTemporary adds a temporary (tmpfs) volume mount.
type Pipeline ¶
type Pipeline struct {
// contains filtered or unexported fields
}
Pipeline wraps custom pipelines to handle step appending.
type Step ¶
type Step struct {
// contains filtered or unexported fields
}
Step is a pipeline Step.
func CustomStep ¶
CustomStep creates a step which calls some shell script.
func (*Step) DockerLogin ¶
DockerLogin sets up login to registry.
func (*Step) EmptyDirVolume ¶
EmptyDirVolume mounts an empty dir volume to the step.
func (*Step) Environment ¶
Environment appends an environment variable to the step.
func (*Step) EnvironmentFromSecret ¶
EnvironmentFromSecret appends an environment variable from secret to the step.
func (*Step) ExceptPullRequest ¶
ExceptPullRequest adds condition to skip step on PRs.
func (*Step) LocalRegistry ¶
LocalRegistry sets up pushing to local registry.
func (*Step) OnlyOnBranch ¶
OnlyOnBranch adds condition to run step only on the specified branch.
func (*Step) OnlyOnPullRequest ¶
OnlyOnPullRequest adds condition to run step only on PRs.
func (*Step) PublishArtifacts ¶
PublishArtifacts publishes artifacts with the default Github settings.
func (*Step) ResourceRequests ¶
ResourceRequests sets step resource requests.
type StepService ¶
StepService provides base Drone compilation to a pipeline.