steps

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	PodInitWaitArgs        = []string{"/bin/sh", "-c", "sleep infinite || true"}
	PodInitContinueArgs    = []string{"killall", "-s", "SIGINT", "sleep"}
	PodRepoVolumeMountPath = "/mnt/repo"
)

Kubernetes execution commands.

View Source
var DefaultFactory wharfyml.StepTypeFactory = factory{
	// contains filtered or unexported fields
}

DefaultFactory is the default factory implementation using the default hardcoded configs.

View Source
var (
	ErrStepTypeUnknown = errors.New("unknown step type")
)

Errors specific to parsing step types.

Functions

func NewFactory

func NewFactory(config *config.Config) wharfyml.StepTypeFactory

NewFactory creates a new step type factory using the provided config.

Types

type Container

type Container struct {
	// Required fields
	Image string
	Cmds  []string

	// Optional fields
	OS                    string
	Shell                 string
	SecretName            string
	ServiceAccount        string
	CertificatesMountPath string
	// contains filtered or unexported fields
}

Container represents a step type for running commands inside a Docker container.

func (Container) PodSpec

func (s Container) PodSpec() v1.PodSpec

PodSpec returns this step's Kubernetes Pod specification. Meant to be used by the wharf-cmd-worker when creating the actual pods.

func (Container) StepTypeName

func (Container) StepTypeName() string

StepTypeName returns the name of this step type.

type Docker

type Docker struct {
	// Required fields
	File string
	Tag  string

	// Optional fields
	Destination string
	Name        string
	Group       string
	Context     string
	Secret      string
	Registry    string
	AppendCert  bool
	Push        bool
	Args        []string
	SecretName  string
	SecretArgs  []string
	// contains filtered or unexported fields
}

Docker represents a step type for building and pushing Docker images.

func (Docker) PodSpec

func (s Docker) PodSpec() v1.PodSpec

PodSpec returns this step's Kubernetes Pod specification. Meant to be used by the wharf-cmd-worker when creating the actual pods.

func (Docker) StepTypeName

func (Docker) StepTypeName() string

StepTypeName returns the name of this step type.

type Helm

type Helm struct {
	// Required fields
	Chart     string
	Name      string
	Namespace string

	// Optional fields
	Repo         string
	Set          map[string]string
	Files        []string
	ChartVersion string
	HelmVersion  string
	Cluster      string
	Secret       string
	// contains filtered or unexported fields
}

Helm represents a step type for installing a Helm chart into a Kubernetes cluster.

func (Helm) PodSpec

func (s Helm) PodSpec() v1.PodSpec

PodSpec returns this step's Kubernetes Pod specification. Meant to be used by the wharf-cmd-worker when creating the actual pods.

func (Helm) StepTypeName

func (Helm) StepTypeName() string

StepTypeName returns the name of this step type.

type HelmPackage

type HelmPackage struct {
	// Optional fields
	Version     string
	ChartPath   string
	Destination string
	Secret      string
	// contains filtered or unexported fields
}

HelmPackage represents a step type for building and uploading a Helm chart to a chart registry.

func (HelmPackage) PodSpec

func (s HelmPackage) PodSpec() v1.PodSpec

PodSpec returns this step's Kubernetes Pod specification. Meant to be used by the wharf-cmd-worker when creating the actual pods.

func (HelmPackage) StepTypeName

func (HelmPackage) StepTypeName() string

StepTypeName returns the name of this step type.

type Kubectl

type Kubectl struct {
	// Required fields
	File  string
	Files []string

	// Optional fields
	Namespace string
	Action    string
	Force     bool
	Cluster   string
	// contains filtered or unexported fields
}

Kubectl represents a step type for running kubectl commands on some Kubernetes manifest files.

func (Kubectl) PodSpec

func (s Kubectl) PodSpec() v1.PodSpec

PodSpec returns this step's Kubernetes Pod specification. Meant to be used by the wharf-cmd-worker when creating the actual pods.

func (Kubectl) StepTypeName

func (Kubectl) StepTypeName() string

StepTypeName returns the name of this step type.

type NuGetPackage

type NuGetPackage struct {
	// Required fields
	Version     string
	ProjectPath string
	Repo        string

	// Optional fields
	SkipDuplicate         bool
	CertificatesMountPath string
	// contains filtered or unexported fields
}

NuGetPackage represents a step type used for building .NET NuGet packages.

func (NuGetPackage) PodSpec

func (s NuGetPackage) PodSpec() v1.PodSpec

PodSpec returns this step's Kubernetes Pod specification. Meant to be used by the wharf-cmd-worker when creating the actual pods.

func (NuGetPackage) StepTypeName

func (NuGetPackage) StepTypeName() string

StepTypeName returns the name of this step type.

type PodSpecer

type PodSpecer interface {
	PodSpec() v1.PodSpec
}

PodSpecer is a type that can return a Kubernetes Pod specification.

type StepType

type StepType interface {
	StepTypeName() string

	PodSpecer
}

StepType is an interface that is implemented by all step types.

Jump to

Keyboard shortcuts

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